Class: DrySchemaRails::Base
- Inherits:
-
Object
- Object
- DrySchemaRails::Base
- Defined in:
- lib/dry_schema_rails/base.rb
Class Method Summary collapse
- .call(*args) ⇒ Object
- .params ⇒ Object (also: contract)
- .schema(&block) ⇒ Object
Class Method Details
.call(*args) ⇒ Object
9 10 11 |
# File 'lib/dry_schema_rails/base.rb', line 9 def call(*args) params.call(*args) end |
.params ⇒ Object Also known as: contract
13 14 15 |
# File 'lib/dry_schema_rails/base.rb', line 13 def params Dry::Schema.Params(&_schema_proc) end |
.schema(&block) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/dry_schema_rails/base.rb', line 19 def schema(&block) if block_given? self._schema_proc = block else _schema_proc end end |