Sha256: 259af8c3b806b188655f08f8c378c8d4a8cc037dc6bef895bfb88f8ec9c7bd91
Contents?: true
Size: 742 Bytes
Versions: 6
Compression:
Stored size: 742 Bytes
Contents
module Inquery module Mixins module SchemaValidation extend ActiveSupport::Concern included do class_attribute :_schema self._schema = nil end module ClassMethods def schema2(*args, &block) self._schema = Schemacop::Schema.new(*args, &block) end def schema3(reference = nil, **options, &block) if reference self._schema = Schemacop::Schema3.new(:reference, options.merge(path: reference)) else self._schema = Schemacop::Schema3.new(:hash, **options, &block) end end # @see schema2 def schema(*args, &block) schema2(*args, &block) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems