Class: Factual::CategoriesResponse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject

Returns the value of attribute body.



4
5
6
# File 'lib/factual/categories_response.rb', line 4

def body
  @body
end

Instance Method Details

#dataObject



14
15
16
17
18
# File 'lib/factual/categories_response.rb', line 14

def data
    if !@body.blank?
        @body
    end
end

#error_messageObject



10
11
12
# File 'lib/factual/categories_response.rb', line 10

def error_message
  # @body.message.text unless success?
end