Class: SimpleTable::Body

Inherits:
Rows
  • Object
show all
Defined in:
lib/simple_table/body.rb

Instance Attribute Summary

Attributes inherited from Rows

#rows

Attributes inherited from Tag

#options, #parent

Instance Method Summary collapse

Methods inherited from Rows

#empty?, #initialize, #render

Methods inherited from Tag

#add_class, #collection_class, #collection_name, #head?, #initialize, #render, #table

Constructor Details

This class inherits a constructor from SimpleTable::Rows

Instance Method Details

#row(options = {}, &block) ⇒ Object



5
6
7
8
9
# File 'lib/simple_table/body.rb', line 5

def row(options = {}, &block)
  table.collection.each_with_index do |record, ix|
    super(record, options_for_record(record, ix, options))
  end
end