Class: ObjectView::Form
- Defined in:
- lib/object_view/input.rb
Instance Attribute Summary
Attributes inherited from Element
#acceptable_children, #children, #single_line, #tag
Instance Method Summary collapse
- #accept_charset=(value) ⇒ Object
- #action=(value) ⇒ Object
-
#initialize ⇒ Form
constructor
A new instance of Form.
- #method=(value) ⇒ 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 ⇒ Form
Returns a new instance of Form.
165 166 167 168 169 |
# File 'lib/object_view/input.rb', line 165 def initialize super @tag = 'form' self.attr('method', "post") end |
Instance Method Details
#accept_charset=(value) ⇒ Object
175 176 177 |
# File 'lib/object_view/input.rb', line 175 def accept_charset=(value) self.attr('accept-charset', value) end |
#action=(value) ⇒ Object
171 172 173 |
# File 'lib/object_view/input.rb', line 171 def action= text self.attr('action', text) end |
#method=(value) ⇒ Object
183 184 185 |
# File 'lib/object_view/input.rb', line 183 def method=(value) self.attr('method', value) end |