Class: RubyLens::ArtModelBuilder::Namespaces
- Inherits:
-
Data
- Object
- Data
- RubyLens::ArtModelBuilder::Namespaces
- Defined in:
- lib/rubylens/art_model_builder.rb
Overview
order lists snapshot ordinals in draw order and is the single authority
for each shuffle; the snapshot-ordinal-to-draw-position inverse is derived
where it is needed rather than stored beside it.
Instance Attribute Summary collapse
-
#names ⇒ Object
readonly
Returns the value of attribute names.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#reference_rows ⇒ Object
readonly
Returns the value of attribute reference_rows.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
Instance Method Summary collapse
-
#draw_positions ⇒ Object
: () -> Array.
-
#referenced_dependency_ordinals ⇒ Object
Link endpoints past the namespace block address dependency stars, which the snapshot numbers from zero after the namespaces.
Instance Attribute Details
#names ⇒ Object (readonly)
Returns the value of attribute names
17 18 19 |
# File 'lib/rubylens/art_model_builder.rb', line 17 def names @names end |
#order ⇒ Object (readonly)
Returns the value of attribute order
17 18 19 |
# File 'lib/rubylens/art_model_builder.rb', line 17 def order @order end |
#reference_rows ⇒ Object (readonly)
Returns the value of attribute reference_rows
17 18 19 |
# File 'lib/rubylens/art_model_builder.rb', line 17 def reference_rows @reference_rows end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows
17 18 19 |
# File 'lib/rubylens/art_model_builder.rb', line 17 def rows @rows end |
Instance Method Details
#draw_positions ⇒ Object
: () -> Array
32 33 34 35 36 |
# File 'lib/rubylens/art_model_builder.rb', line 32 def draw_positions positions = Array.new(order.length) order.each_with_index { |old_index, new_index| positions[old_index] = new_index } positions end |
#referenced_dependency_ordinals ⇒ Object
Link endpoints past the namespace block address dependency stars, which the snapshot numbers from zero after the namespaces.
: () -> Array
27 28 29 |
# File 'lib/rubylens/art_model_builder.rb', line 27 def referenced_dependency_ordinals reference_rows.map { |_referring_index, referenced_index| referenced_index - order.length } end |