Class: Odin::Transform::SegmentDef
- Inherits:
-
Object
- Object
- Odin::Transform::SegmentDef
- Defined in:
- lib/odin/transform/transform_types.rb
Overview
Segment definition — a named section with field mappings
Instance Attribute Summary collapse
-
#array_index ⇒ Object
readonly
Returns the value of attribute array_index.
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#counter_name ⇒ Object
readonly
Returns the value of attribute counter_name.
-
#discriminator ⇒ Object
readonly
Returns the value of attribute discriminator.
-
#discriminator_value ⇒ Object
readonly
Returns the value of attribute discriminator_value.
-
#each_source ⇒ Object
readonly
Returns the value of attribute each_source.
-
#field_mappings ⇒ Object
readonly
Returns the value of attribute field_mappings.
-
#if_condition ⇒ Object
readonly
Returns the value of attribute if_condition.
-
#is_array ⇒ Object
readonly
Returns the value of attribute is_array.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#pass ⇒ Object
readonly
Returns the value of attribute pass.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#when_condition ⇒ Object
readonly
Returns the value of attribute when_condition.
Instance Method Summary collapse
-
#initialize(name:, path: nil, array_index: nil, field_mappings: [], discriminator: nil, discriminator_value: nil, when_condition: nil, each_source: nil, if_condition: nil, children: [], pass: nil, counter_name: nil, is_array: false) ⇒ SegmentDef
constructor
A new instance of SegmentDef.
Constructor Details
#initialize(name:, path: nil, array_index: nil, field_mappings: [], discriminator: nil, discriminator_value: nil, when_condition: nil, each_source: nil, if_condition: nil, children: [], pass: nil, counter_name: nil, is_array: false) ⇒ SegmentDef
Returns a new instance of SegmentDef.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/odin/transform/transform_types.rb', line 130 def initialize( name:, path: nil, array_index: nil, field_mappings: [], discriminator: nil, discriminator_value: nil, when_condition: nil, each_source: nil, if_condition: nil, children: [], pass: nil, counter_name: nil, is_array: false ) @name = name @path = path @array_index = array_index @field_mappings = field_mappings @discriminator = discriminator @discriminator_value = discriminator_value @when_condition = when_condition @each_source = each_source @if_condition = if_condition @children = children @pass = pass @counter_name = counter_name @is_array = is_array end |
Instance Attribute Details
#array_index ⇒ Object (readonly)
Returns the value of attribute array_index.
125 126 127 |
# File 'lib/odin/transform/transform_types.rb', line 125 def array_index @array_index end |
#children ⇒ Object (readonly)
Returns the value of attribute children.
125 126 127 |
# File 'lib/odin/transform/transform_types.rb', line 125 def children @children end |
#counter_name ⇒ Object (readonly)
Returns the value of attribute counter_name.
125 126 127 |
# File 'lib/odin/transform/transform_types.rb', line 125 def counter_name @counter_name end |
#discriminator ⇒ Object (readonly)
Returns the value of attribute discriminator.
125 126 127 |
# File 'lib/odin/transform/transform_types.rb', line 125 def discriminator @discriminator end |
#discriminator_value ⇒ Object (readonly)
Returns the value of attribute discriminator_value.
125 126 127 |
# File 'lib/odin/transform/transform_types.rb', line 125 def discriminator_value @discriminator_value end |
#each_source ⇒ Object (readonly)
Returns the value of attribute each_source.
125 126 127 |
# File 'lib/odin/transform/transform_types.rb', line 125 def each_source @each_source end |
#field_mappings ⇒ Object (readonly)
Returns the value of attribute field_mappings.
125 126 127 |
# File 'lib/odin/transform/transform_types.rb', line 125 def field_mappings @field_mappings end |
#if_condition ⇒ Object (readonly)
Returns the value of attribute if_condition.
125 126 127 |
# File 'lib/odin/transform/transform_types.rb', line 125 def if_condition @if_condition end |
#is_array ⇒ Object (readonly)
Returns the value of attribute is_array.
125 126 127 |
# File 'lib/odin/transform/transform_types.rb', line 125 def is_array @is_array end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
125 126 127 |
# File 'lib/odin/transform/transform_types.rb', line 125 def name @name end |
#pass ⇒ Object (readonly)
Returns the value of attribute pass.
125 126 127 |
# File 'lib/odin/transform/transform_types.rb', line 125 def pass @pass end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
125 126 127 |
# File 'lib/odin/transform/transform_types.rb', line 125 def path @path end |
#when_condition ⇒ Object (readonly)
Returns the value of attribute when_condition.
125 126 127 |
# File 'lib/odin/transform/transform_types.rb', line 125 def when_condition @when_condition end |