Class: ObjectView::THeadRow

Inherits:
TRow show all
Defined in:
lib/object_view/table.rb

Instance Attribute Summary

Attributes inherited from Element

#acceptable_children, #children, #single_line, #tag

Instance Method Summary collapse

Methods inherited from Element

#<<, #add, #add_with_tag, #attr, #attributes, #css_class=, #find_element_with_tag, #id=, #is_acceptable_child?, #on_click=, #render, #render_attributes, #render_children, #style, #style=

Constructor Details

#initializeTHeadRow

Returns a new instance of THeadRow.



95
96
97
98
99
# File 'lib/object_view/table.rb', line 95

def initialize
  super()
  @tag = "tr"
  self.acceptable_children = [THeadCell]
end

Instance Method Details

#cell(content = nil) ⇒ Object



101
102
103
104
105
106
107
108
# File 'lib/object_view/table.rb', line 101

def cell(content = nil)
  cell = THeadCell.new
  if (content != nil)
    cell.add content
  end
  self.add cell
  return cell
end