Class: Labimotion::ElementVariationHeader
- Inherits:
-
Object
- Object
- Labimotion::ElementVariationHeader
- Defined in:
- lib/labimotion/libs/element_variation_header.rb
Overview
ElementVariationHeader Turns an ordered column set into the banded header the React grid draws:
row 1 group Properties | Metadata | Segments
row 2 sub-group Conditions | Notes | Group | My Segment
row 3 leaf Temperature [C] | Solvent | | | Mass [g]
Adjacent columns sharing a header are merged across, and a header with no level beneath it -- the identity columns, and the metadata leaves, which hang straight off their group -- is merged down to the leaf row. That is exactly what ag-grid renders for the same columns.
rows are the three cell arrays; merges the ranges to hand to Axlsx.
Constant Summary collapse
- ROWS =
3
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
Instance Method Summary collapse
-
#initialize(columns) ⇒ ElementVariationHeader
constructor
A new instance of ElementVariationHeader.
- #merges ⇒ Object
- #rows ⇒ Object
Constructor Details
#initialize(columns) ⇒ ElementVariationHeader
Returns a new instance of ElementVariationHeader.
22 23 24 |
# File 'lib/labimotion/libs/element_variation_header.rb', line 22 def initialize(columns) @columns = columns end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
26 27 28 |
# File 'lib/labimotion/libs/element_variation_header.rb', line 26 def columns @columns end |
Instance Method Details
#merges ⇒ Object
32 33 34 |
# File 'lib/labimotion/libs/element_variation_header.rb', line 32 def merges plan[:merges] end |
#rows ⇒ Object
28 29 30 |
# File 'lib/labimotion/libs/element_variation_header.rb', line 28 def rows plan[:rows] end |