Class: Yandex::Translator
- Inherits:
-
Object
- Object
- Yandex::Translator
- Defined in:
- lib/yandex/translator.rb,
lib/yandex/translator/langs.rb,
lib/yandex/translator/detect.rb,
lib/yandex/translator/translate.rb
Overview
Translator class
Defined Under Namespace
Modules: Detect, Langs, Translate Classes: YandexFailure
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Translator
constructor
A new instance of Translator.
Methods included from Translate
Methods included from Detect
Methods included from Langs
Constructor Details
#initialize(args = {}) ⇒ Translator
Returns a new instance of Translator.
21 22 23 |
# File 'lib/yandex/translator.rb', line 21 def initialize(args = {}) @api_key = args[:api_key] end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
19 20 21 |
# File 'lib/yandex/translator.rb', line 19 def api_key @api_key end |