Method: Fitting::Cover::Response#initialize
- Defined in:
- lib/fitting/cover/response.rb
#initialize(response) ⇒ Response
Returns a new instance of Response.
7 8 9 10 11 12 13 14 |
# File 'lib/fitting/cover/response.rb', line 7 def initialize(response) @cover_json_schemas = Fitting::Cover::JSONSchema.new(response.json_schema) @json_schemas = @cover_json_schemas.json_schemas + [response.json_schema] @combinations = @cover_json_schemas.combinations @flags = @cover_json_schemas.json_schemas.map do |json_schema| JSON::Validator.validate(json_schema, response.body) end end |