Module: Inquery::Mixins::SchemaValidation::ClassMethods
- Defined in:
- lib/inquery/mixins/schema_validation.rb
Instance Method Summary collapse
- #schema(*args, &block) ⇒ Object
- #schema2(*args, &block) ⇒ Object
- #schema3(reference = nil, **options, &block) ⇒ Object
Instance Method Details
#schema(*args, &block) ⇒ Object
25 26 27 |
# File 'lib/inquery/mixins/schema_validation.rb', line 25 def schema(*args, &block) schema2(*args, &block) end |
#schema2(*args, &block) ⇒ Object
12 13 14 |
# File 'lib/inquery/mixins/schema_validation.rb', line 12 def schema2(*args, &block) self._schema = Schemacop::Schema.new(*args, &block) end |
#schema3(reference = nil, **options, &block) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/inquery/mixins/schema_validation.rb', line 16 def schema3(reference = nil, **, &block) if reference self._schema = Schemacop::Schema3.new(:reference, .merge(path: reference)) else self._schema = Schemacop::Schema3.new(:hash, **, &block) end end |