Class: Mensa::Table::Component

Inherits:
ApplicationComponent show all
Includes:
Mensa::TablesHelper
Defined in:
app/components/mensa/table/component.rb

Instance Attribute Summary collapse

Attributes inherited from ApplicationComponent

#original_view_context

Instance Method Summary collapse

Constructor Details

#initialize(table_name, config = {}, **options) ⇒ Component

Returns a new instance of Component.



10
11
12
13
# File 'app/components/mensa/table/component.rb', line 10

def initialize(table_name, config = {}, **options)
  @table = Mensa.for_name(table_name, config)
  @table.component = self
end

Instance Attribute Details

#tableObject (readonly)

Returns the value of attribute table.



8
9
10
# File 'app/components/mensa/table/component.rb', line 8

def table
  @table
end