Class: CWM::TableItem
- Inherits:
-
Object
- Object
- CWM::TableItem
- Defined in:
- library/cwm/src/lib/cwm/table.rb
Overview
An entry of a Table
Instance Attribute Summary collapse
- #children ⇒ Array<TableItem, Array> readonly
- #id ⇒ String, Symbol readonly
-
#open ⇒ Boolean
readonly
Whether children are initially expanded.
- #values ⇒ Array readonly
Instance Method Summary collapse
-
#initialize(id, values, open: true, children: []) ⇒ TableItem
constructor
A new instance of TableItem.
Constructor Details
#initialize(id, values, open: true, children: []) ⇒ TableItem
Returns a new instance of TableItem.
20 21 22 23 24 25 |
# File 'library/cwm/src/lib/cwm/table.rb', line 20 def initialize(id, values, open: true, children: []) @id = id @values = values @open = open @children = children end |
Instance Attribute Details
#children ⇒ Array<TableItem, Array> (readonly)
15 16 17 |
# File 'library/cwm/src/lib/cwm/table.rb', line 15 def children @children end |
#id ⇒ String, Symbol (readonly)
8 9 10 |
# File 'library/cwm/src/lib/cwm/table.rb', line 8 def id @id end |
#open ⇒ Boolean (readonly)
Returns whether children are initially expanded.
18 19 20 |
# File 'library/cwm/src/lib/cwm/table.rb', line 18 def open @open end |
#values ⇒ Array (readonly)
11 12 13 |
# File 'library/cwm/src/lib/cwm/table.rb', line 11 def values @values end |