Class: ObjectView::TRow
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Element
#acceptable_children, #attributes, #children, #single_line, #tag
Instance Method Summary collapse
- #cell(content = nil) ⇒ Object
-
#initialize ⇒ TRow
constructor
A new instance of TRow.
Methods inherited from Element
#<<, #add, #add_with_tag, #attr, #css_class=, #find_element_with_tag, #id=, #is_acceptable_child?, #on_click=, #render, #render_attributes, #render_children, #style=
Constructor Details
#initialize ⇒ TRow
Returns a new instance of TRow.
76 77 78 79 80 |
# File 'lib/object_view/table.rb', line 76 def initialize super() @tag = "tr" self.acceptable_children = [TCell, THeadCell] end |
Instance Method Details
#cell(content = nil) ⇒ Object
82 83 84 85 86 87 88 89 |
# File 'lib/object_view/table.rb', line 82 def cell(content = nil) cell = TCell.new if (content != nil) cell.add content end self.add cell return cell end |