Class: DeepL::Resources::TranslationMemoryTargetSegment
- Inherits:
-
Object
- Object
- DeepL::Resources::TranslationMemoryTargetSegment
- Defined in:
- lib/deepl/resources/translation_memory_segments.rb
Instance Attribute Summary collapse
-
#creation_time ⇒ Object
readonly
Returns the value of attribute creation_time.
-
#last_used_time ⇒ Object
readonly
Returns the value of attribute last_used_time.
-
#target_language ⇒ Object
readonly
Returns the value of attribute target_language.
-
#target_segment_id ⇒ Object
readonly
Returns the value of attribute target_segment_id.
-
#target_text ⇒ Object
readonly
Returns the value of attribute target_text.
-
#updated_time ⇒ Object
readonly
Returns the value of attribute updated_time.
Instance Method Summary collapse
-
#initialize(target_segment) ⇒ TranslationMemoryTargetSegment
constructor
A new instance of TranslationMemoryTargetSegment.
- #to_s ⇒ Object
Constructor Details
#initialize(target_segment) ⇒ TranslationMemoryTargetSegment
Returns a new instance of TranslationMemoryTargetSegment.
12 13 14 15 16 17 18 19 |
# File 'lib/deepl/resources/translation_memory_segments.rb', line 12 def initialize(target_segment) @target_segment_id = target_segment['target_segment_id'] @target_language = target_segment['target_language'] @target_text = target_segment['target_text'] @creation_time = Utils::TimeParser.parse_optional_time(target_segment['creation_time']) @updated_time = Utils::TimeParser.parse_optional_time(target_segment['updated_time']) @last_used_time = Utils::TimeParser.parse_optional_time(target_segment['last_used_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_segments.rb', line 9 def creation_time @creation_time end |
#last_used_time ⇒ Object (readonly)
Returns the value of attribute last_used_time.
9 10 11 |
# File 'lib/deepl/resources/translation_memory_segments.rb', line 9 def last_used_time @last_used_time end |
#target_language ⇒ Object (readonly)
Returns the value of attribute target_language.
9 10 11 |
# File 'lib/deepl/resources/translation_memory_segments.rb', line 9 def target_language @target_language end |
#target_segment_id ⇒ Object (readonly)
Returns the value of attribute target_segment_id.
9 10 11 |
# File 'lib/deepl/resources/translation_memory_segments.rb', line 9 def target_segment_id @target_segment_id end |
#target_text ⇒ Object (readonly)
Returns the value of attribute target_text.
9 10 11 |
# File 'lib/deepl/resources/translation_memory_segments.rb', line 9 def target_text @target_text end |
#updated_time ⇒ Object (readonly)
Returns the value of attribute updated_time.
9 10 11 |
# File 'lib/deepl/resources/translation_memory_segments.rb', line 9 def updated_time @updated_time end |
Instance Method Details
#to_s ⇒ Object
21 22 23 |
# File 'lib/deepl/resources/translation_memory_segments.rb', line 21 def to_s "#{target_language}: #{target_text}" end |