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.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/deepl/resources/glossary.rb', line 11

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.



9
10
11
# File 'lib/deepl/resources/glossary.rb', line 9

def creation_time
  @creation_time
end

#entry_countObject (readonly)

Returns the value of attribute entry_count.



9
10
11
# File 'lib/deepl/resources/glossary.rb', line 9

def entry_count
  @entry_count
end

#idObject (readonly)

Returns the value of attribute id.



9
10
11
# File 'lib/deepl/resources/glossary.rb', line 9

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/deepl/resources/glossary.rb', line 9

def name
  @name
end

#readyObject (readonly)

Returns the value of attribute ready.



9
10
11
# File 'lib/deepl/resources/glossary.rb', line 9

def ready
  @ready
end

#source_langObject (readonly)

Returns the value of attribute source_lang.



9
10
11
# File 'lib/deepl/resources/glossary.rb', line 9

def source_lang
  @source_lang
end

#target_langObject (readonly)

Returns the value of attribute target_lang.



9
10
11
# File 'lib/deepl/resources/glossary.rb', line 9

def target_lang
  @target_lang
end

Instance Method Details

#to_sObject



23
24
25
# File 'lib/deepl/resources/glossary.rb', line 23

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