Class: YandexCloud::Translate

Inherits:
Object
  • Object
show all
Includes:
HTTParty, Detect, Languages, Translate
Defined in:
lib/yandex_cloud/translate.rb,
lib/yandex_cloud/translate/detect.rb,
lib/yandex_cloud/translate/languages.rb,
lib/yandex_cloud/translate/translate.rb

Overview

Authentification requests

Defined Under Namespace

Modules: Detect, Languages, Translate

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Translate

#translate

Methods included from Detect

#detect

Methods included from Languages

#languages

Constructor Details

#initialize(args = {}) ⇒ Translate

Returns a new instance of Translate.



19
20
21
22
# File 'lib/yandex_cloud/translate.rb', line 19

def initialize(args = {})
  @iam_token = args[:iam_token]
  @folder_id = args[:folder_id] || ENV['TRANSLATE_FOLDER_ID']
end

Instance Attribute Details

#folder_idObject (readonly)

Returns the value of attribute folder_id.



17
18
19
# File 'lib/yandex_cloud/translate.rb', line 17

def folder_id
  @folder_id
end

#iam_tokenObject (readonly)

Returns the value of attribute iam_token.



17
18
19
# File 'lib/yandex_cloud/translate.rb', line 17

def iam_token
  @iam_token
end