Class: CWM::TableItem

Inherits:
Object
  • Object
show all
Defined in:
library/cwm/src/lib/cwm/table.rb

Overview

An entry of a Table

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#childrenArray<TableItem, Array> (readonly)

Returns:

See Also:



15
16
17
# File 'library/cwm/src/lib/cwm/table.rb', line 15

def children
  @children
end

#idString, Symbol (readonly)

Returns:

  • (String, Symbol)


8
9
10
# File 'library/cwm/src/lib/cwm/table.rb', line 8

def id
  @id
end

#openBoolean (readonly)

Returns whether children are initially expanded.

Returns:

  • (Boolean)

    whether children are initially expanded



18
19
20
# File 'library/cwm/src/lib/cwm/table.rb', line 18

def open
  @open
end

#valuesArray (readonly)

Returns:

  • (Array)


11
12
13
# File 'library/cwm/src/lib/cwm/table.rb', line 11

def values
  @values
end