Class: DataMaps::Dsl::Mapping::ConditionsDsl

Inherits:
Struct
  • Object
show all
Includes:
Concerns::Configurable
Defined in:
lib/data_maps/dsl/mapping/conditions_dsl.rb

Overview

Structure to describe a field mapping

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Concerns::Configurable

#configure

Constructor Details

#initializeConditionsDsl

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

#thensObject

Returns the value of attribute thens

Returns:

  • (Object)

    the current value of thens



5
6
7
# File 'lib/data_maps/dsl/mapping/conditions_dsl.rb', line 5

def thens
  @thens
end

#whensObject

Returns the value of attribute whens

Returns:

  • (Object)

    the current value of whens



5
6
7
# File 'lib/data_maps/dsl/mapping/conditions_dsl.rb', line 5

def whens
  @whens
end

Instance Method Details

#to_hObject

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