Class: DeepL::Resources::Glossary

Inherits:
Base
  • Object
show all
Defined in:
lib/deepl/resources/glossary.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#request, #response

Instance Method Summary collapse

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_timeObject (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_countObject (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

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/deepl/resources/glossary.rb', line 6

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/deepl/resources/glossary.rb', line 6

def name
  @name
end

#readyObject (readonly)

Returns the value of attribute ready.



6
7
8
# File 'lib/deepl/resources/glossary.rb', line 6

def ready
  @ready
end

#source_langObject (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_langObject (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_sObject



20
21
22
# File 'lib/deepl/resources/glossary.rb', line 20

def to_s
  "#{id} - #{name}"
end