Class: DeepL::Resources::TranslationMemory
- Defined in:
- lib/deepl/resources/translation_memory.rb
Instance Attribute Summary collapse
-
#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.
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.
11 12 13 14 15 16 17 18 |
# File 'lib/deepl/resources/translation_memory.rb', line 11 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 end |
Instance Attribute Details
#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 |
Instance Method Details
#to_s ⇒ Object
20 21 22 |
# File 'lib/deepl/resources/translation_memory.rb', line 20 def to_s "#{translation_memory_id} - #{name}" end |