Class: El::Form

Inherits:
Element show all
Defined in:
lib/element_component/core/form.rb

Overview

represent the form tag

Instance Attribute Summary

Attributes inherited from Element

#attributes, #components, #element

Instance Method Summary collapse

Methods inherited from Element

#add_attribute, #add_component, #add_content, #build, #get_component, #remove_attribute!, #remove_attribute_value, #reset_attributes!, #reset_components!, #reset_contents!

Constructor Details

#initialize(method: 'POST', action: '/') ⇒ Form

Returns a new instance of Form.



6
7
8
9
10
11
# File 'lib/element_component/core/form.rb', line 6

def initialize(method: 'POST', action: '/')
  super('form', closing_tag: true)

  add_attribute(:method, method)
  add_attribute(:action, action)
end