Class: Ecm::Translations::ImportTranslationsService::TranslationInFileSystem
- Inherits:
-
Object
- Object
- Ecm::Translations::ImportTranslationsService::TranslationInFileSystem
- Defined in:
- app/services/ecm/translations/import_translations_service.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#locale ⇒ Object
Returns the value of attribute locale.
-
#raw_key ⇒ Object
Returns the value of attribute raw_key.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #human ⇒ Object
-
#initialize(raw_key, value) ⇒ TranslationInFileSystem
constructor
A new instance of TranslationInFileSystem.
- #to_translation_attributes_hash ⇒ Object
Constructor Details
#initialize(raw_key, value) ⇒ TranslationInFileSystem
Returns a new instance of TranslationInFileSystem.
5 6 7 8 |
# File 'app/services/ecm/translations/import_translations_service.rb', line 5 def initialize(raw_key, value) @raw_key = raw_key @value = value end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
4 5 6 |
# File 'app/services/ecm/translations/import_translations_service.rb', line 4 def key @key end |
#locale ⇒ Object
Returns the value of attribute locale.
4 5 6 |
# File 'app/services/ecm/translations/import_translations_service.rb', line 4 def locale @locale end |
#raw_key ⇒ Object
Returns the value of attribute raw_key.
4 5 6 |
# File 'app/services/ecm/translations/import_translations_service.rb', line 4 def raw_key @raw_key end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'app/services/ecm/translations/import_translations_service.rb', line 4 def value @value end |
Instance Method Details
#human ⇒ Object
10 11 12 |
# File 'app/services/ecm/translations/import_translations_service.rb', line 10 def human "#{locale} | #{@key}: #{@value}" end |
#to_translation_attributes_hash ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'app/services/ecm/translations/import_translations_service.rb', line 22 def to_translation_attributes_hash { locale: locale, key: key, value: value, is_proc: false } end |