Class: I18nPoTools::Formats::BasicFlatYamlFormat
- Inherits:
-
BaseFormat
- Object
- BaseFormat
- I18nPoTools::Formats::BasicFlatYamlFormat
show all
- Defined in:
- lib/i18n_po_tools/formats/basic_flat_yaml_format.rb
Instance Attribute Summary
Attributes inherited from BaseFormat
#options
Instance Method Summary
collapse
Methods inherited from BaseFormat
#banner_msg, #file_encoding, #read_file, #read_with_options, #write_file, #write_with_options
Instance Method Details
#read(input_filename) ⇒ Object
7
8
9
10
|
# File 'lib/i18n_po_tools/formats/basic_flat_yaml_format.rb', line 7
def read(input_filename)
content = read_file(input_filename)
flat_hash = YAML.load(content)
end
|
#write(output_filename, data) ⇒ Object
12
13
14
15
16
|
# File 'lib/i18n_po_tools/formats/basic_flat_yaml_format.rb', line 12
def write(output_filename, data)
content = "# "+ banner_msg + "\n"
content += data.to_yaml
write_file(output_filename, content)
end
|