Sha256: 8a050c8975c838e6947bd57503ebfea3964a8389e0828acf785678b2d741e6b9
Contents?: true
Size: 568 Bytes
Versions: 8
Compression:
Stored size: 568 Bytes
Contents
module Fitting module Report class Combinations class Empty < RuntimeError; end class NotFound < RuntimeError; end def initialize(combinations) @combinations = combinations end def to_a @combinations end def find!(test) raise Empty if @combinations.empty? @combinations.map do |combination| if JSON::Validator.fully_validate(combination.json_schema, test.body) == [] return combination end end raise NotFound end end end end
Version data entries
8 entries across 8 versions & 1 rubygems