Class: Grapple::Components::HtmlColgroup

Inherits:
HtmlComponent show all
Defined in:
lib/grapple/components/html_colgroup.rb

Instance Attribute Summary

Attributes inherited from BaseComponent

#builder, #columns, #params, #records, #template

Instance Method Summary collapse

Methods inherited from BaseComponent

#initialize, setting

Constructor Details

This class inherits a constructor from Grapple::Components::BaseComponent

Instance Method Details

#renderObject



5
6
7
8
9
10
# File 'lib/grapple/components/html_colgroup.rb', line 5

def render
	cols = columns.collect do |col|
		indent + (col[:width].nil? ? "<col>" : "<col width=\"#{col[:width]}\">")
	end
	"<colgroup>\n#{cols.join("\n")}\n</colgroup>\n".html_safe
end