Class: CheckMot::Response
- Inherits:
-
Object
- Object
- CheckMot::Response
show all
- Defined in:
- lib/check_mot/response.rb
Instance Method Summary
collapse
Constructor Details
#initialize(raw_response) ⇒ Response
Returns a new instance of Response.
4
5
6
|
# File 'lib/check_mot/response.rb', line 4
def initialize(raw_response)
@raw_response = raw_response
end
|
Instance Method Details
#raw ⇒ Object
10
11
12
|
# File 'lib/check_mot/response.rb', line 10
def raw
raw_response.body
end
|
#validate ⇒ Object
14
15
16
|
# File 'lib/check_mot/response.rb', line 14
def validate
fail ResponseError.new(status, raw) unless success?
end
|