Class: DeepL::Resources::Glossary
- Defined in:
- lib/deepl/resources/glossary.rb
Instance Attribute Summary collapse
-
#creation_time ⇒ Object
readonly
Returns the value of attribute creation_time.
-
#entry_count ⇒ Object
readonly
Returns the value of attribute entry_count.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#ready ⇒ Object
readonly
Returns the value of attribute ready.
-
#source_lang ⇒ Object
readonly
Returns the value of attribute source_lang.
-
#target_lang ⇒ Object
readonly
Returns the value of attribute target_lang.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(glossary, *args) ⇒ Glossary
constructor
A new instance of Glossary.
- #to_s ⇒ Object
Constructor Details
#initialize(glossary, *args) ⇒ Glossary
Returns a new instance of Glossary.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/deepl/resources/glossary.rb', line 8 def initialize(glossary, *args) super(*args) @id = glossary['glossary_id'] @name = glossary['name'] @ready = glossary['ready'] @source_lang = glossary['source_lang'] @target_lang = glossary['target_lang'] @creation_time = glossary['creation_time'] @entry_count = glossary['entry_count'] end |
Instance Attribute Details
#creation_time ⇒ Object (readonly)
Returns the value of attribute creation_time.
6 7 8 |
# File 'lib/deepl/resources/glossary.rb', line 6 def creation_time @creation_time end |
#entry_count ⇒ Object (readonly)
Returns the value of attribute entry_count.
6 7 8 |
# File 'lib/deepl/resources/glossary.rb', line 6 def entry_count @entry_count end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/deepl/resources/glossary.rb', line 6 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/deepl/resources/glossary.rb', line 6 def name @name end |
#ready ⇒ Object (readonly)
Returns the value of attribute ready.
6 7 8 |
# File 'lib/deepl/resources/glossary.rb', line 6 def ready @ready end |
#source_lang ⇒ Object (readonly)
Returns the value of attribute source_lang.
6 7 8 |
# File 'lib/deepl/resources/glossary.rb', line 6 def source_lang @source_lang end |
#target_lang ⇒ Object (readonly)
Returns the value of attribute target_lang.
6 7 8 |
# File 'lib/deepl/resources/glossary.rb', line 6 def target_lang @target_lang end |
Instance Method Details
#to_s ⇒ Object
20 21 22 |
# File 'lib/deepl/resources/glossary.rb', line 20 def to_s "#{id} - #{name}" end |