Class: Schoolfinder::Response
- Inherits:
-
Object
- Object
- Schoolfinder::Response
- Defined in:
- lib/schoolfinder/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
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
#body ⇒ Object
Returns the value of attribute body.
4 5 6 |
# File 'lib/schoolfinder/response.rb', line 4 def body @body end |