Class: TotallyTabular::Row
Instance Method Summary collapse
- #attributes!(attributes = {}) ⇒ Object
-
#initialize ⇒ Row
constructor
A new instance of Row.
- #render(content) ⇒ Object
Constructor Details
#initialize ⇒ Row
Returns a new instance of Row.
4 5 6 7 |
# File 'lib/totally_tabular/row.rb', line 4 def initialize @helper = HtmlHelper.new @attributes = {} end |
Instance Method Details
#attributes!(attributes = {}) ⇒ Object
9 10 11 |
# File 'lib/totally_tabular/row.rb', line 9 def attributes!(attributes={}) @attributes = attributes end |
#render(content) ⇒ Object
13 14 15 16 17 |
# File 'lib/totally_tabular/row.rb', line 13 def render(content) if !content.empty? @helper.content_tag(:tr, content, @attributes) end.to_s end |