Sha256: 5bf06be8c67fccbe6d25f6dc8557c312d6b9de3aedc2dedcd2ee358ceb30d00a

Contents?: true

Size: 439 Bytes

Versions: 6

Compression:

Stored size: 439 Bytes

Contents

module JSON
  class Schema
    class ExtendsAttribute < Attribute
      def self.validate(current_schema, data, fragments, validator, options = {})
        schemas = current_schema.schema['extends']
        schemas = [schemas] if !schemas.is_a?(Array)
        schemas.each do |s|
          schema = JSON::Schema.new(s,current_schema.uri,validator)
          schema.validate(data, fragments, options)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
json-schema-1.0.4 lib/json-schema/attributes/extends.rb
json-schema-1.0.3 lib/json-schema/attributes/extends.rb
json-schema-1.0.2 lib/json-schema/attributes/extends.rb
seomoz-json-schema-1.0.1 lib/json-schema/attributes/extends.rb
json-schema-1.0.1 lib/json-schema/attributes/extends.rb
json-schema-1.0.0 lib/json-schema/attributes/extends.rb