Class: Schoolfinder::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



6
7
8
9
10
11
# File 'lib/schoolfinder/response.rb', line 6

def initialize(response)
  rash_response(response)
  if self.body.respond_to?('fault_string')
    raise Schoolfinder::Error.new(self.body.fault_code, self.body.fault_string)
  end
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



4
5
6
# File 'lib/schoolfinder/response.rb', line 4

def body
  @body
end