Class: RenderTable::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/render_table/configuration.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



4
5
6
7
8
9
# File 'lib/render_table/configuration.rb', line 4

def initialize
  @table_id = RenderTable::Configuration.default_table_id
  @table_class = RenderTable::Configuration.default_table_class
  @html = RenderTable::Configuration.default_html
  @cell_value = RenderTable::Configuration.default_cell_value
end

Instance Attribute Details

#cell_valueObject

Returns the value of attribute cell_value.



2
3
4
# File 'lib/render_table/configuration.rb', line 2

def cell_value
  @cell_value
end

#htmlObject

Returns the value of attribute html.



2
3
4
# File 'lib/render_table/configuration.rb', line 2

def html
  @html
end

#table_classObject

Returns the value of attribute table_class.



2
3
4
# File 'lib/render_table/configuration.rb', line 2

def table_class
  @table_class
end

#table_idObject

Returns the value of attribute table_id.



2
3
4
# File 'lib/render_table/configuration.rb', line 2

def table_id
  @table_id
end

Class Method Details

.default_cell_valueObject



33
34
35
# File 'lib/render_table/configuration.rb', line 33

def default_cell_value
  '---'
end

.default_htmlObject



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/render_table/configuration.rb', line 12

def default_html
  {
    rows: {
      classes: {},
      ids: {}
    },
    cells: {
      classes: {},
      ids: {}
    }
  }
end

.default_table_classObject



29
30
31
# File 'lib/render_table/configuration.rb', line 29

def default_table_class
  ''
end

.default_table_idObject



25
26
27
# File 'lib/render_table/configuration.rb', line 25

def default_table_id
  ''
end