Class: PolyglotIos::Serializer::Source::TranslationCase

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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, #token, #use_old_naming

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)
  "case #{clean_name} = \"#{value}\""
end