Class: ObjectView::Ul
Instance Attribute Summary
Attributes inherited from Element
#acceptable_children, #children, #single_line, #tag
Instance Method Summary collapse
-
#initialize ⇒ Ul
constructor
A new instance of Ul.
- #item(content = nil) ⇒ Object
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
#initialize ⇒ Ul
Returns a new instance of Ul.
8 9 10 11 12 |
# File 'lib/object_view/ul.rb', line 8 def initialize super() @tag = "ul" self.acceptable_children = [Li] end |
Instance Method Details
#item(content = nil) ⇒ Object
14 15 16 |
# File 'lib/object_view/ul.rb', line 14 def item(content = nil) return self.add Li.new(content) end |