Class: ObjectView::Header
Instance Attribute Summary
Attributes inherited from Element
#acceptable_children, #attributes, #children, #single_line, #tag
Instance Method Summary collapse
-
#initialize(n, text) ⇒ Header
constructor
A new instance of Header.
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(n, text) ⇒ Header
Returns a new instance of Header.
6 7 8 9 10 11 |
# File 'lib/object_view/header.rb', line 6 def initialize(n, text) super() @single_line = true @tag = "h#{n}" add text end |