Class: Grapple::Components::HtmlColgroup
- Inherits:
-
HtmlComponent
- Object
- BaseComponent
- HtmlComponent
- Grapple::Components::HtmlColgroup
- 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
Constructor Details
This class inherits a constructor from Grapple::Components::BaseComponent
Instance Method Details
#render ⇒ Object
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 |