Class: LcpRuby::Kanban::Board

Inherits:
Struct
  • Object
show all
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

Instance Method Summary collapse

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

#cellsObject

Returns the value of attribute cells

Returns:

  • (Object)

    the current value of cells



8
9
10
# File 'lib/lcp_ruby/kanban/board.rb', line 8

def cells
  @cells
end

#columnsObject

Returns the value of attribute columns

Returns:

  • (Object)

    the current value of columns



8
9
10
# File 'lib/lcp_ruby/kanban/board.rb', line 8

def columns
  @columns
end

#providerObject

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider



8
9
10
# File 'lib/lcp_ruby/kanban/board.rb', line 8

def provider
  @provider
end

#swimlanesObject

Returns the value of attribute swimlanes

Returns:

  • (Object)

    the current value of swimlanes



8
9
10
# File 'lib/lcp_ruby/kanban/board.rb', line 8

def swimlanes
  @swimlanes
end

#total_countObject

Returns the value of attribute total_count

Returns:

  • (Object)

    the current value of total_count



8
9
10
# File 'lib/lcp_ruby/kanban/board.rb', line 8

def total_count
  @total_count
end

#truncatedObject

Returns the value of attribute truncated

Returns:

  • (Object)

    the current value of 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