Class: ObjectView::Option
- Defined in:
- lib/object_view/input.rb
Instance Attribute Summary
Attributes inherited from Element
#acceptable_children, #children, #single_line, #tag
Instance Method Summary collapse
-
#initialize(name, value) ⇒ Option
constructor
A new instance of Option.
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(name, value) ⇒ Option
Returns a new instance of Option.
115 116 117 118 119 120 |
# File 'lib/object_view/input.rb', line 115 def initialize(name, value) super() @tag = 'option' self.attr('value', value) self.add name end |