Class: Momo::MappingRow
Instance Attribute Summary collapse
-
#values ⇒ Object
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize(&block) ⇒ MappingRow
constructor
A new instance of MappingRow.
- #item(name, value) ⇒ Object
Methods inherited from MomoScope
Constructor Details
#initialize(&block) ⇒ MappingRow
Returns a new instance of MappingRow.
7 8 9 10 |
# File 'lib/momo/mapping.rb', line 7 def initialize(&block) @values = {} instance_eval(&block) end |
Instance Attribute Details
#values ⇒ Object
Returns the value of attribute values.
5 6 7 |
# File 'lib/momo/mapping.rb', line 5 def values @values end |
Instance Method Details
#item(name, value) ⇒ Object
12 13 14 |
# File 'lib/momo/mapping.rb', line 12 def item(name, value) @values[name] = value end |