Class: View::Table::Row

Inherits:
Struct
  • Object
show all
Defined in:
lib/view/formatters/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#indexObject

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



142
143
144
# File 'lib/view/formatters/table.rb', line 142

def index
  @index
end

#resourceObject

Returns the value of attribute resource

Returns:

  • (Object)

    the current value of resource



142
143
144
# File 'lib/view/formatters/table.rb', line 142

def resource
  @resource
end

#tableObject

Returns the value of attribute table

Returns:

  • (Object)

    the current value of table



142
143
144
# File 'lib/view/formatters/table.rb', line 142

def table
  @table
end

Instance Method Details

#each {|Cell| ... } ⇒ Object

Loops through all columns and yields cells.

Yields:



147
148
149
150
151
# File 'lib/view/formatters/table.rb', line 147

def each
  table.columns.each do |column|
    yield Cell.new(self, column)
  end
end