Class: DeepL::Resources::Language
- Defined in:
- lib/deepl/resources/language.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(code, name, *args) ⇒ Language
constructor
A new instance of Language.
- #to_s ⇒ Object
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
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'lib/deepl/resources/language.rb', line 6 def code @code end |
#name ⇒ Object (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_s ⇒ Object
15 16 17 |
# File 'lib/deepl/resources/language.rb', line 15 def to_s "#{code} - #{name}" end |