Class: LcpRuby::Kanban::Board
- Inherits:
-
Struct
- Object
- Struct
- LcpRuby::Kanban::Board
- Defined in:
- lib/lcp_ruby/kanban/board.rb
Overview
Aggregates everything the kanban templates need to render one board.
‘cells` is a 2D Hash keyed by `[column_value, swimlane_value]`. Phase 1 always uses `swimlane_value = :_default` (no swimlane dimension). Phase 3 populates real swimlane keys; the rest of the contract is unchanged.
Instance Attribute Summary collapse
-
#cells ⇒ Object
Returns the value of attribute cells.
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#swimlanes ⇒ Object
Returns the value of attribute swimlanes.
-
#total_count ⇒ Object
Returns the value of attribute total_count.
-
#truncated ⇒ Object
Returns the value of attribute truncated.
Instance Method Summary collapse
-
#initialize(columns:, cells:, swimlanes: nil, truncated: false, total_count: nil, provider: nil) ⇒ Board
constructor
A new instance of Board.
-
#records_for(column_value) ⇒ Object
Convenience: records in column ‘value` for the default swimlane.
Constructor Details
#initialize(columns:, cells:, swimlanes: nil, truncated: false, total_count: nil, provider: nil) ⇒ Board
Returns a new instance of Board.
17 18 19 20 |
# File 'lib/lcp_ruby/kanban/board.rb', line 17 def initialize(columns:, cells:, swimlanes: nil, truncated: false, total_count: nil, provider: nil) super end |
Instance Attribute Details
#cells ⇒ Object
Returns the value of attribute cells
8 9 10 |
# File 'lib/lcp_ruby/kanban/board.rb', line 8 def cells @cells end |
#columns ⇒ Object
Returns the value of attribute columns
8 9 10 |
# File 'lib/lcp_ruby/kanban/board.rb', line 8 def columns @columns end |
#provider ⇒ Object
Returns the value of attribute provider
8 9 10 |
# File 'lib/lcp_ruby/kanban/board.rb', line 8 def provider @provider end |
#swimlanes ⇒ Object
Returns the value of attribute swimlanes
8 9 10 |
# File 'lib/lcp_ruby/kanban/board.rb', line 8 def swimlanes @swimlanes end |
#total_count ⇒ Object
Returns the value of attribute total_count
8 9 10 |
# File 'lib/lcp_ruby/kanban/board.rb', line 8 def total_count @total_count end |
#truncated ⇒ Object
Returns the value of attribute truncated
8 9 10 |
# File 'lib/lcp_ruby/kanban/board.rb', line 8 def truncated @truncated end |
Instance Method Details
#records_for(column_value) ⇒ Object
Convenience: records in column ‘value` for the default swimlane.
23 24 25 |
# File 'lib/lcp_ruby/kanban/board.rb', line 23 def records_for(column_value) cells[[ column_value, :_default ]] || [] end |