Module: Parametric::DSL::ClassMethods
- Defined in:
- lib/parametric/dsl.rb
Instance Method Summary collapse
Instance Method Details
#inherited(subclass) ⇒ Object
35 36 37 |
# File 'lib/parametric/dsl.rb', line 35 def inherited(subclass) subclass.schema = @schema.merge(Parametric::Schema.new) end |
#schema(options = {}, &block) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/parametric/dsl.rb', line 39 def schema( = {}, &block) return @schema unless .any? || block_given? new_schema = Parametric::Schema.new(, &block) @schema = @schema.merge(new_schema) end |
#schema=(sc) ⇒ Object
31 32 33 |
# File 'lib/parametric/dsl.rb', line 31 def schema=(sc) @schema = sc end |