Class: DataMaps::Dsl::Mapping::ConditionsDsl
- Inherits:
-
Struct
- Object
- Struct
- DataMaps::Dsl::Mapping::ConditionsDsl
- Includes:
- Concerns::Configurable
- Defined in:
- lib/data_maps/dsl/mapping/conditions_dsl.rb
Overview
Structure to describe a field mapping
Instance Attribute Summary collapse
-
#thens ⇒ Object
Returns the value of attribute thens.
-
#whens ⇒ Object
Returns the value of attribute whens.
Instance Method Summary collapse
-
#initialize ⇒ ConditionsDsl
constructor
A new instance of ConditionsDsl.
-
#to_h ⇒ Object
Serialize DSL to an Hash.
Methods included from Concerns::Configurable
Constructor Details
#initialize ⇒ ConditionsDsl
Returns a new instance of ConditionsDsl.
8 9 10 11 |
# File 'lib/data_maps/dsl/mapping/conditions_dsl.rb', line 8 def initialize self.whens = {} self.thens = {} end |
Instance Attribute Details
#thens ⇒ Object
Returns the value of attribute thens
5 6 7 |
# File 'lib/data_maps/dsl/mapping/conditions_dsl.rb', line 5 def thens @thens end |
#whens ⇒ Object
Returns the value of attribute whens
5 6 7 |
# File 'lib/data_maps/dsl/mapping/conditions_dsl.rb', line 5 def whens @whens end |
Instance Method Details
#to_h ⇒ Object
Serialize DSL to an Hash
14 15 16 17 |
# File 'lib/data_maps/dsl/mapping/conditions_dsl.rb', line 14 def to_h data = super data.stringify_keys end |