Class: Yandex::Translate::ResponseVerify

Inherits:
Object
  • Object
show all
Defined in:
lib/response_verify.rb

Instance Method Summary collapse

Instance Method Details

#verify(parsed) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/response_verify.rb', line 5

def verify(parsed)
  if parsed["code"] != nil && parsed["code"] != 200 
    Yandex::Translate::APIError.new(parsed["code"], parsed["message"])
  else
    return parsed
  end
end