Class: DeepL::Resources::TranslationMemory
- Defined in:
- lib/deepl/resources/translation_memory.rb
Instance Attribute Summary collapse
-
#creation_time ⇒ Object
readonly
Returns the value of attribute creation_time.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#segment_count ⇒ Object
readonly
Returns the value of attribute segment_count.
-
#source_language ⇒ Object
readonly
Returns the value of attribute source_language.
-
#target_languages ⇒ Object
readonly
Returns the value of attribute target_languages.
-
#translation_memory_id ⇒ Object
readonly
Returns the value of attribute translation_memory_id.
-
#updated_time ⇒ Object
readonly
Returns the value of attribute updated_time.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(translation_memory, *args) ⇒ TranslationMemory
constructor
A new instance of TranslationMemory.
- #to_s ⇒ Object
Constructor Details
#initialize(translation_memory, *args) ⇒ TranslationMemory
Returns a new instance of TranslationMemory.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/deepl/resources/translation_memory.rb', line 12 def initialize(translation_memory, *args) super(*args) @translation_memory_id = translation_memory['translation_memory_id'] @name = translation_memory['name'] @source_language = translation_memory['source_language'] @target_languages = translation_memory['target_languages'] || [] @segment_count = translation_memory['segment_count'] || 0 @creation_time = Utils::TimeParser.parse_optional_time(translation_memory['creation_time']) @updated_time = Utils::TimeParser.parse_optional_time(translation_memory['updated_time']) end |
Instance Attribute Details
#creation_time ⇒ Object (readonly)
Returns the value of attribute creation_time.
9 10 11 |
# File 'lib/deepl/resources/translation_memory.rb', line 9 def creation_time @creation_time end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/deepl/resources/translation_memory.rb', line 9 def name @name end |
#segment_count ⇒ Object (readonly)
Returns the value of attribute segment_count.
9 10 11 |
# File 'lib/deepl/resources/translation_memory.rb', line 9 def segment_count @segment_count end |
#source_language ⇒ Object (readonly)
Returns the value of attribute source_language.
9 10 11 |
# File 'lib/deepl/resources/translation_memory.rb', line 9 def source_language @source_language end |
#target_languages ⇒ Object (readonly)
Returns the value of attribute target_languages.
9 10 11 |
# File 'lib/deepl/resources/translation_memory.rb', line 9 def target_languages @target_languages end |
#translation_memory_id ⇒ Object (readonly)
Returns the value of attribute translation_memory_id.
9 10 11 |
# File 'lib/deepl/resources/translation_memory.rb', line 9 def translation_memory_id @translation_memory_id end |
#updated_time ⇒ Object (readonly)
Returns the value of attribute updated_time.
9 10 11 |
# File 'lib/deepl/resources/translation_memory.rb', line 9 def updated_time @updated_time end |
Instance Method Details
#to_s ⇒ Object
23 24 25 |
# File 'lib/deepl/resources/translation_memory.rb', line 23 def to_s "#{translation_memory_id} - #{name}" end |