Class: Yandex::Translator

Inherits:
Object
  • Object
show all
Includes:
HTTParty, Detect, Langs, Translate
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

Instance Method Summary collapse

Methods included from Translate

#translate

Methods included from Detect

#detect

Methods included from Langs

#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_keyObject (readonly)

Returns the value of attribute api_key.



19
20
21
# File 'lib/yandex/translator.rb', line 19

def api_key
  @api_key
end