Class: I18nAdd::YamlProcessor::TranslationEntry
- Inherits:
-
Object
- Object
- I18nAdd::YamlProcessor::TranslationEntry
- Defined in:
- lib/i18n_add/yaml_processor.rb
Overview
Encapsulates a translation entry with its key path and value
Instance Attribute Summary collapse
-
#key_path ⇒ Object
readonly
Returns the value of attribute key_path.
-
#keys ⇒ Object
readonly
Returns the value of attribute keys.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(key_path:, value:) ⇒ TranslationEntry
constructor
A new instance of TranslationEntry.
Constructor Details
#initialize(key_path:, value:) ⇒ TranslationEntry
Returns a new instance of TranslationEntry.
232 233 234 235 236 |
# File 'lib/i18n_add/yaml_processor.rb', line 232 def initialize(key_path:, value:) @key_path = key_path @value = value @keys = key_path.split(".") end |
Instance Attribute Details
#key_path ⇒ Object (readonly)
Returns the value of attribute key_path.
230 231 232 |
# File 'lib/i18n_add/yaml_processor.rb', line 230 def key_path @key_path end |
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
230 231 232 |
# File 'lib/i18n_add/yaml_processor.rb', line 230 def keys @keys end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
230 231 232 |
# File 'lib/i18n_add/yaml_processor.rb', line 230 def value @value end |