Class: UiBibz::Ui::Ux::Columns

Inherits:
Object
  • Object
show all
Defined in:
lib/ui_bibz/ui/ux/table/components/columns.rb

Instance Method Summary (collapse)

Constructor Details

- (Columns) initialize(columns = nil)

Returns a new instance of Columns



4
5
6
# File 'lib/ui_bibz/ui/ux/table/components/columns.rb', line 4

def initialize columns = nil
  @columns = columns || []
end

Instance Method Details

- (Object) column(data_index = nil, options = nil, html_options = nil, &block)

Add column in table



9
10
11
# File 'lib/ui_bibz/ui/ux/table/components/columns.rb', line 9

def column data_index = nil, options = nil, html_options = nil, &block
  @columns << Column.new(data_index, options, html_options, &block)
end

- (Object) list

Get all columns



14
15
16
# File 'lib/ui_bibz/ui/ux/table/components/columns.rb', line 14

def list
  @columns
end