Sha256: c244d6e89a3259ba4474ee4dbbd0f69e1926fba7784cb797c8adb017e42e5fe8

Contents?: true

Size: 473 Bytes

Versions: 35

Compression:

Stored size: 473 Bytes

Contents

module Schemacop
  class Schema3 < BaseSchema
    def initialize(*args, **kwargs, &block)
      super()
      @root = V3::Node.create(*args, **kwargs, &block)
    end

    # Validate data for the defined Schema
    #
    # @param data The data to validate.
    # @return [Schemacop::Collector] The object that collected errors
    #   throughout the validation.
    def validate(data)
      root.validate(data)
    end

    def as_json
      root.as_json
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
schemacop-3.0.29 lib/schemacop/schema3.rb
schemacop-3.0.28 lib/schemacop/schema3.rb
schemacop-3.0.27 lib/schemacop/schema3.rb
schemacop-3.0.26 lib/schemacop/schema3.rb
schemacop-3.0.25 lib/schemacop/schema3.rb
schemacop-3.0.24 lib/schemacop/schema3.rb
schemacop-3.0.23 lib/schemacop/schema3.rb
schemacop-3.0.22 lib/schemacop/schema3.rb
schemacop-3.0.21 lib/schemacop/schema3.rb
schemacop-3.0.20 lib/schemacop/schema3.rb
schemacop-3.0.19 lib/schemacop/schema3.rb
schemacop-3.0.18 lib/schemacop/schema3.rb
schemacop-3.0.17 lib/schemacop/schema3.rb
schemacop-3.0.16 lib/schemacop/schema3.rb
schemacop-3.0.15 lib/schemacop/schema3.rb
schemacop-3.0.14 lib/schemacop/schema3.rb
schemacop-3.0.13 lib/schemacop/schema3.rb
schemacop-3.0.12 lib/schemacop/schema3.rb
schemacop-3.0.11 lib/schemacop/schema3.rb
schemacop-3.0.10 lib/schemacop/schema3.rb