Class: Terrestrial::Cli::DotStringsParser
- Inherits:
-
Object
- Object
- Terrestrial::Cli::DotStringsParser
- Defined in:
- lib/terrestrial/cli/dot_strings_parser.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path) ⇒ DotStringsParser
constructor
A new instance of DotStringsParser.
- #parse ⇒ Object
Constructor Details
#initialize(path) ⇒ DotStringsParser
Returns a new instance of DotStringsParser.
13 14 15 |
# File 'lib/terrestrial/cli/dot_strings_parser.rb', line 13 def initialize(path) @path = path end |
Class Method Details
.parse_file(path) ⇒ Object
8 9 10 |
# File 'lib/terrestrial/cli/dot_strings_parser.rb', line 8 def parse_file(path) new(path).parse end |
Instance Method Details
#parse ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/terrestrial/cli/dot_strings_parser.rb', line 17 def parse entries = do_parse_file read_file_with_correct_encoding(path) entries.each do |entry| entry["type"] = "localizable.strings" entry["file"] = path end end |