Class: Factual::CategoriesResponse
- Inherits:
-
Object
- Object
- Factual::CategoriesResponse
- Defined in:
- lib/factual/categories_response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
Instance Method Summary collapse
- #data ⇒ Object
- #error_message ⇒ Object
-
#initialize(response) ⇒ CategoriesResponse
constructor
A new instance of CategoriesResponse.
Constructor Details
#initialize(response) ⇒ CategoriesResponse
Returns a new instance of CategoriesResponse.
6 7 8 |
# File 'lib/factual/categories_response.rb', line 6 def initialize(response) @body = rash_response(response) end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
4 5 6 |
# File 'lib/factual/categories_response.rb', line 4 def body @body end |
Instance Method Details
#data ⇒ Object
14 15 16 17 18 |
# File 'lib/factual/categories_response.rb', line 14 def data if !@body.blank? @body end end |
#error_message ⇒ Object
10 11 12 |
# File 'lib/factual/categories_response.rb', line 10 def # @body.message.text unless success? end |