Class: Odin::Transform::FieldMapping
- Inherits:
-
Object
- Object
- Odin::Transform::FieldMapping
- Defined in:
- lib/odin/transform/transform_types.rb
Overview
Field mapping — a single assignment within a segment
Instance Attribute Summary collapse
-
#directives ⇒ Object
readonly
Returns the value of attribute directives.
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
-
#modifiers ⇒ Object
readonly
Returns the value of attribute modifiers.
-
#target_field ⇒ Object
readonly
Returns the value of attribute target_field.
Instance Method Summary collapse
-
#initialize(target_field:, expression:, modifiers: [], directives: []) ⇒ FieldMapping
constructor
A new instance of FieldMapping.
Constructor Details
#initialize(target_field:, expression:, modifiers: [], directives: []) ⇒ FieldMapping
Returns a new instance of FieldMapping.
180 181 182 183 184 185 |
# File 'lib/odin/transform/transform_types.rb', line 180 def initialize(target_field:, expression:, modifiers: [], directives: []) @target_field = target_field @expression = expression @modifiers = modifiers @directives = directives end |
Instance Attribute Details
#directives ⇒ Object (readonly)
Returns the value of attribute directives.
178 179 180 |
# File 'lib/odin/transform/transform_types.rb', line 178 def directives @directives end |
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
178 179 180 |
# File 'lib/odin/transform/transform_types.rb', line 178 def expression @expression end |
#modifiers ⇒ Object (readonly)
Returns the value of attribute modifiers.
178 179 180 |
# File 'lib/odin/transform/transform_types.rb', line 178 def modifiers @modifiers end |
#target_field ⇒ Object (readonly)
Returns the value of attribute target_field.
178 179 180 |
# File 'lib/odin/transform/transform_types.rb', line 178 def target_field @target_field end |