Class: EacRailsUtils::DataTableHelper::Setup

Inherits:
Object
  • Object
show all
Defined in:
app/helpers/eac_rails_utils/data_table_helper/setup.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSetup

Returns a new instance of Setup.


9
10
11
12
# File 'app/helpers/eac_rails_utils/data_table_helper/setup.rb', line 9

def initialize
  @columns = []
  @paging = true
end

Instance Attribute Details

#columnsObject (readonly)

Returns the value of attribute columns.


6
7
8
# File 'app/helpers/eac_rails_utils/data_table_helper/setup.rb', line 6

def columns
  @columns
end

#pagingObject

Returns the value of attribute paging.


7
8
9
# File 'app/helpers/eac_rails_utils/data_table_helper/setup.rb', line 7

def paging
  @paging
end

Instance Method Details

#column(label, path = nil, &block) ⇒ Object


14
15
16
# File 'app/helpers/eac_rails_utils/data_table_helper/setup.rb', line 14

def column(label, path = nil, &block)
  @columns << ::EacRailsUtils::DataTableHelper::Column.new(label, path, block)
end