Class | GetText::MOFile
In: | lib/gettext/runtime/mofile.rb
Parent: | Hash

### Methods

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

### Classes and Modules

Class GetText::MOFile::HeaderRev1
Class GetText::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

### 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)

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.]

load(arg)
load_from_file(filename)
load_from_stream(io)
next_prime(seed)
next_prime(seed)
plural_as_proc()
prime?(number)
save_to_file(filename)
save_to_stream(io)

Save data as little endian format.

set_comment(msgid_or_sym, comment)
update!()

[Validate]