Class: Stupidedi::Schema::Generation::Models::TableDefinition
- Inherits:
-
Struct
- Object
- Struct
- Stupidedi::Schema::Generation::Models::TableDefinition
- Defined in:
- lib/stupidedi/schema/generation/models.rb
Overview
A heading/detail/summary table. #area is the lowercase enum name ("heading"/"detail"/"summary"); #name is the display name. #children is a mixed, ordered list of SegmentUse and LoopDefinition.
Instance Attribute Summary collapse
-
#area ⇒ Object
Returns the value of attribute area.
-
#children ⇒ Object
Returns the value of attribute children.
-
#name ⇒ Object
Returns the value of attribute name.
-
#position ⇒ Object
Returns the value of attribute position.
Instance Method Summary collapse
Instance Attribute Details
#area ⇒ Object
Returns the value of attribute area
54 55 56 |
# File 'lib/stupidedi/schema/generation/models.rb', line 54 def area @area end |
#children ⇒ Object
Returns the value of attribute children
54 55 56 |
# File 'lib/stupidedi/schema/generation/models.rb', line 54 def children @children end |
#name ⇒ Object
Returns the value of attribute name
54 55 56 |
# File 'lib/stupidedi/schema/generation/models.rb', line 54 def name @name end |
#position ⇒ Object
Returns the value of attribute position
54 55 56 |
# File 'lib/stupidedi/schema/generation/models.rb', line 54 def position @position end |
Instance Method Details
#ordered_children ⇒ Object
55 56 57 58 59 |
# File 'lib/stupidedi/schema/generation/models.rb', line 55 def ordered_children # Index tiebreaker keeps ordering deterministic if two children ever # share a position (Ruby's sort_by is not stable). children.each_with_index.sort_by { |child, i| [child.position, i] }.map(&:first) end |