Class: DeepL::Resources::Language

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

Instance Attribute Summary collapse

Attributes inherited from Base

#request, #response

Instance Method Summary collapse

Constructor Details

#initialize(code, name, *args) ⇒ Language

Returns a new instance of Language.



8
9
10
11
12
13
# File 'lib/deepl/resources/language.rb', line 8

def initialize(code, name, *args)
  super(*args)

  @code = code
  @name = name
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#to_sObject



15
16
17
# File 'lib/deepl/resources/language.rb', line 15

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