Method: DataTable::Column#initialize

Defined in:
lib/data-table/column.rb

#initialize(name, description = '', opts = {}, &renderer) ⇒ Column

Returns a new instance of Column.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/data-table/column.rb', line 7

def initialize(name, description = '', opts = {}, &renderer)
  @name = name
  @description = description
  @data_type = opts[:data_type]
  @help_text = opts[:help_text]
  @css_class = opts[:css_class]
  @attributes = opts[:attributes] || {}
  @width = opts[:width]
  @options = opts
  @display = true
  @index = 0
  @renderer = renderer
end