Class: Linguin::Languages
- Inherits:
-
BaseResponse
- Object
- BaseResponse
- Linguin::Languages
- Defined in:
- lib/linguin/languages.rb
Overview
Linguin::Languages
Returns a hash of supported languages.
Constant Summary
Constants inherited from BaseResponse
Instance Attribute Summary
Attributes inherited from BaseResponse
Class Method Summary collapse
Methods inherited from BaseResponse
from_httparty, #initialize, #raise_on_error!
Constructor Details
This class inherits a constructor from Linguin::BaseResponse
Class Method Details
.error(code, message) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/linguin/languages.rb', line 8 def error(code, ) new do |status| status.error = { code: code, message: } end.raise_on_error! end |
.success(response) ⇒ Object
17 18 19 |
# File 'lib/linguin/languages.rb', line 17 def success(response) response end |