Class: CheckMot::Response

Inherits:
Object
  • Object
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

#rawObject



10
11
12
# File 'lib/check_mot/response.rb', line 10

def raw
  raw_response.body
end

#validateObject



14
15
16
# File 'lib/check_mot/response.rb', line 14

def validate
  fail ResponseError.new(status, raw) unless success?
end