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.
-
#elif_condition ⇒ Object
readonly
Returns the value of attribute elif_condition.
-
#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.
-
#is_else ⇒ Object
readonly
Returns the value of attribute is_else.
-
#is_literal ⇒ Object
readonly
Returns the value of attribute is_literal.
-
#literal_body ⇒ Object
readonly
Returns the value of attribute literal_body.
-
#loops ⇒ Object
readonly
Returns the value of attribute loops.
-
#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, elif_condition: nil, is_else: false, children: [], pass: nil, counter_name: nil, is_array: false, loops: [], is_literal: false, literal_body: nil) ⇒ 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, elif_condition: nil, is_else: false, children: [], pass: nil, counter_name: nil, is_array: false, loops: [], is_literal: false, literal_body: nil) ⇒ SegmentDef
Returns a new instance of SegmentDef.
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/odin/transform/transform_types.rb', line 135 def initialize( name:, path: nil, array_index: nil, field_mappings: [], discriminator: nil, discriminator_value: nil, when_condition: nil, each_source: nil, if_condition: nil, elif_condition: nil, is_else: false, children: [], pass: nil, counter_name: nil, is_array: false, loops: [], is_literal: false, literal_body: nil ) @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 @elif_condition = elif_condition @is_else = is_else @children = children @pass = pass @counter_name = counter_name @is_array = is_array @loops = loops @is_literal = is_literal @literal_body = literal_body end |
Instance Attribute Details
#array_index ⇒ Object (readonly)
Returns the value of attribute array_index.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def array_index @array_index end |
#children ⇒ Object (readonly)
Returns the value of attribute children.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def children @children end |
#counter_name ⇒ Object (readonly)
Returns the value of attribute counter_name.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def counter_name @counter_name end |
#discriminator ⇒ Object (readonly)
Returns the value of attribute discriminator.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def discriminator @discriminator end |
#discriminator_value ⇒ Object (readonly)
Returns the value of attribute discriminator_value.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def discriminator_value @discriminator_value end |
#each_source ⇒ Object (readonly)
Returns the value of attribute each_source.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def each_source @each_source end |
#elif_condition ⇒ Object (readonly)
Returns the value of attribute elif_condition.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def elif_condition @elif_condition end |
#field_mappings ⇒ Object (readonly)
Returns the value of attribute field_mappings.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def field_mappings @field_mappings end |
#if_condition ⇒ Object (readonly)
Returns the value of attribute if_condition.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def if_condition @if_condition end |
#is_array ⇒ Object (readonly)
Returns the value of attribute is_array.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def is_array @is_array end |
#is_else ⇒ Object (readonly)
Returns the value of attribute is_else.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def is_else @is_else end |
#is_literal ⇒ Object (readonly)
Returns the value of attribute is_literal.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def is_literal @is_literal end |
#literal_body ⇒ Object (readonly)
Returns the value of attribute literal_body.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def literal_body @literal_body end |
#loops ⇒ Object (readonly)
Returns the value of attribute loops.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def loops @loops end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def name @name end |
#pass ⇒ Object (readonly)
Returns the value of attribute pass.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def pass @pass end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def path @path end |
#when_condition ⇒ Object (readonly)
Returns the value of attribute when_condition.
128 129 130 |
# File 'lib/odin/transform/transform_types.rb', line 128 def when_condition @when_condition end |