Class: Spine::Transform::Mapping
- Inherits:
-
Object
- Object
- Spine::Transform::Mapping
- Includes:
- Syntax::Boolean, Syntax::Copy, Syntax::Date, Syntax::Decimal, Syntax::Integer, Syntax::Timestamp, Syntax::Transform
- Defined in:
- lib/spine/transform/mapping.rb
Constant Summary
Constants included from Syntax::Boolean
Instance Attribute Summary collapse
-
#commands ⇒ Object
readonly
Returns the value of attribute commands.
Instance Method Summary collapse
- #for(key) ⇒ Object
-
#initialize(dsl) ⇒ Mapping
constructor
A new instance of Mapping.
- #parse ⇒ Object
Methods included from Syntax::Timestamp
Methods included from Syntax::Date
Methods included from Syntax::Boolean
Methods included from Syntax::Decimal
Methods included from Syntax::Integer
Methods included from Syntax::Transform
Methods included from Syntax::Copy
Constructor Details
#initialize(dsl) ⇒ Mapping
Returns a new instance of Mapping.
14 15 16 |
# File 'lib/spine/transform/mapping.rb', line 14 def initialize(dsl) @dsl = dsl end |
Instance Attribute Details
#commands ⇒ Object (readonly)
Returns the value of attribute commands.
12 13 14 |
# File 'lib/spine/transform/mapping.rb', line 12 def commands @commands end |
Instance Method Details
#for(key) ⇒ Object
22 23 24 |
# File 'lib/spine/transform/mapping.rb', line 22 def for(key) commands[key] || Commands::Null end |
#parse ⇒ Object
26 27 28 |
# File 'lib/spine/transform/mapping.rb', line 26 def parse instance_eval &@dsl end |