Module: Declarative::Schema::DSL
- Defined in:
- lib/declarative/schema.rb
Instance Method Summary collapse
- #defaults(options = {}, &block) ⇒ Object
-
#definition_class ⇒ Object
TODO: test me.
- #definitions ⇒ Object
- #property(name, options = {}, &block) ⇒ Object
Instance Method Details
#defaults(options = {}, &block) ⇒ Object
27 28 29 30 31 |
# File 'lib/declarative/schema.rb', line 27 def defaults(={}, &block) heritage.record(:defaults, , &block) _defaults.merge!(, &block) end |
#definition_class ⇒ Object
TODO: test me.
37 38 39 |
# File 'lib/declarative/schema.rb', line 37 def definition_class # TODO: test me. Definitions::Definition end |
#definitions ⇒ Object
33 34 35 |
# File 'lib/declarative/schema.rb', line 33 def definitions @definitions ||= Definitions.new(definition_class) end |
#property(name, options = {}, &block) ⇒ Object
21 22 23 24 25 |
# File 'lib/declarative/schema.rb', line 21 def property(name, ={}, &block) heritage.record(:property, name, , &block) build_definition(name, , &block) end |