Class: DeepL::Resources::LanguagePair
- Defined in:
- lib/deepl/resources/language_pair.rb
Instance Attribute Summary collapse
-
#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(source_lang, target_lang, *args) ⇒ LanguagePair
constructor
A new instance of LanguagePair.
- #to_s ⇒ Object
Constructor Details
#initialize(source_lang, target_lang, *args) ⇒ LanguagePair
Returns a new instance of LanguagePair.
11 12 13 14 15 16 |
# File 'lib/deepl/resources/language_pair.rb', line 11 def initialize(source_lang, target_lang, *args) super(*args) @source_lang = source_lang @target_lang = target_lang end |
Instance Attribute Details
#source_lang ⇒ Object (readonly)
Returns the value of attribute source_lang.
9 10 11 |
# File 'lib/deepl/resources/language_pair.rb', line 9 def source_lang @source_lang end |
#target_lang ⇒ Object (readonly)
Returns the value of attribute target_lang.
9 10 11 |
# File 'lib/deepl/resources/language_pair.rb', line 9 def target_lang @target_lang end |
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/deepl/resources/language_pair.rb', line 18 def to_s "#{source_lang} - #{target_lang}" end |