Class | MOFile
In: | lib/gettext/mo.rb
Parent: | Hash

### Methods

hash_string load load_from_file load_from_stream new next_prime open prime? save_to_file save_to_stream set_comment update!

### Classes and Modules

Class MOFile::HeaderRev1
Class MOFile::InvalidFormat

### Constants

Header | = | Struct.new(:magic, :revision, :nstrings, :orig_table_offset, :translated_table_offset, :hash_table_size, :hash_table_offset)
MAGIC_BIG_ENDIAN | = | "\x95\x04\x12\xde"
MAGIC_LITTLE_ENDIAN | = | "\xde\x12\x04\x95"
HASHWORDBITS | = | 32 |  | From gettext-0.12.1/gettext-runtime/intl/hash-string.h Defines the so called `hashpjw’ function by P.J. Weinberger [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, 1986, 1987 Bell Telephone Laboratories, Inc.]

### Attributes

charset | [R] |
filename | [R] |
last_modified | [RW] |
little_endian | [RW] |
nplurals | [R] |
path | [RW] |
plural | [R] |

### Public Class methods

new(output_charset = nil)
open(arg = nil, output_charset = nil)

### Public Instance methods

hash_string(str)
load(arg)
load_from_file(filename)
load_from_stream(io)
next_prime(seed)

From gettext-0.12.1/gettext-tools/lib/hash.c

prime?(candidate)

From gettext-0.12.1/gettext-tools/lib/hash.c

save_to_file(filename)
save_to_stream(io)
set_comment(msgid_or_sym, comment)
update!()

[Validate]