Sha256: e123a247fc97e84595734bbf6fac4336d2e4012264f48c8a6bb540063e2dfe62
Contents?: true
Size: 639 Bytes
Versions: 39
Compression:
Stored size: 639 Bytes
Contents
module Schemacop class Schema2 < BaseSchema def initialize(*args, **kwargs, &block) super() @root = V2::HashValidator.new do req :root, *args, **kwargs, &block end 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) dupped_data = V2::Dupper.dup_data(data) collector = V2::Collector.new(dupped_data) root.fields[:root].validate({ root: data }, collector.ignore_next_segment) return collector end end end
Version data entries
39 entries across 39 versions & 1 rubygems