Class: DiviningRod::Mappings
- Inherits:
-
Object
- Object
- DiviningRod::Mappings
- Defined in:
- lib/divining_rod/mappings.rb
Class Attribute Summary collapse
-
.root_definition ⇒ Object
Returns the value of attribute root_definition.
Class Method Summary collapse
Class Attribute Details
.root_definition ⇒ Object
Returns the value of attribute root_definition.
6 7 8 |
# File 'lib/divining_rod/mappings.rb', line 6 def root_definition @root_definition end |
Class Method Details
.define(opts = {}) {|Mapper.new(@root_definition, opts)| ... } ⇒ Object
8 9 10 11 12 |
# File 'lib/divining_rod/mappings.rb', line 8 def define(opts = {}) @root_definition = Definition.new { true } yield Mapper.new(@root_definition, opts) @root_definition.freeze end |
.evaluate(obj) ⇒ Object
14 15 16 |
# File 'lib/divining_rod/mappings.rb', line 14 def evaluate(obj) @root_definition.evaluate(obj) end |