Class: CheckMot::ByDateResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/check_mot/by_date_response.rb

Instance Method Summary collapse

Methods inherited from Response

#initialize, #raw, #validate

Constructor Details

This class inherits a constructor from CheckMot::Response

Instance Method Details

#resourcesObject



5
6
7
8
9
10
11
# File 'lib/check_mot/by_date_response.rb', line 5

def resources
  return [] if status == 404

  validate

  sanitized.map { |source_hash| Resource.new(source_hash) }
end

#sanitizedObject



13
14
15
# File 'lib/check_mot/by_date_response.rb', line 13

def sanitized
  parsed_response.map(&method(:transform))
end