Class: Rescodegen::SwiftStringsGenerator
- Inherits:
-
StringsGenerator
- Object
- StringsGenerator
- Rescodegen::SwiftStringsGenerator
- Defined in:
- lib/rescodegen/code_generator/swift_strings_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate(keys, values) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rescodegen/code_generator/swift_strings_generator.rb', line 6 def generate(keys, values) super(keys, values) import_header("Foundation") start_struct("Strings") .start_enum("Singular", "String") .add_cases(keys, values) .start_computed_property("localizedString", "String") .return_localized_string .close_brackets .close_brackets .close_brackets @output end |