Class: PolyglotIos::Serializer::Source::TranslationCase
- Inherits:
-
Object
- Object
- PolyglotIos::Serializer::Source::TranslationCase
- Includes:
- Helper::General
- Defined in:
- lib/ios_polyglot_cli/serializers/sources/swift_helpers/translation_case.rb
Constant Summary
Constants included from Helper::General
Helper::General::ESCAPE_KEYWORDS
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(name, value) ⇒ TranslationCase
constructor
A new instance of TranslationCase.
- #serialized ⇒ Object
Methods included from Helper::General
#clean_case_name, #clean_enum_name, #clean_variable_name, #config, #escape_keyword_if_needed, #escape_with_underscore_if_needed, #indent, #programming_language, #project_configs, #skip_writing_language_struct, #token, #token_env_variable, #url, #use_old_naming
Methods included from Helper::Terminal
#generate_token_message, #prompt, #success
Constructor Details
#initialize(name, value) ⇒ TranslationCase
Returns a new instance of TranslationCase.
10 11 12 13 |
# File 'lib/ios_polyglot_cli/serializers/sources/swift_helpers/translation_case.rb', line 10 def initialize(name, value) @name = name @value = value end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/ios_polyglot_cli/serializers/sources/swift_helpers/translation_case.rb', line 7 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
8 9 10 |
# File 'lib/ios_polyglot_cli/serializers/sources/swift_helpers/translation_case.rb', line 8 def value @value end |
Instance Method Details
#serialized ⇒ Object
15 16 17 18 |
# File 'lib/ios_polyglot_cli/serializers/sources/swift_helpers/translation_case.rb', line 15 def serialized() clean_name = clean_case_name(name) "public static let #{clean_name}: Strings = \"#{value}\"" end |