Class: Formidable::Elements::Input
- Inherits:
-
Element
- Object
- BasicElement
- Element
- Formidable::Elements::Input
- Defined in:
- lib/formidable/elements.rb
Direct Known Subclasses
EmailField, FileField, HiddenField, PasswordField, Submit, TextField
Constant Summary
Constants included from Coercions
Coercions::IncompatibleInterface, Coercions::MissingCoercion
Constants included from Rendering
Rendering::RendererNotAssigned
Instance Attribute Summary
Attributes inherited from BasicElement
#attributes, #cleaned_data, #content, #name, #raw_data, #tag
Attributes included from Rendering
Instance Method Summary collapse
-
#initialize(name, attributes = Hash.new, raw_data = nil) ⇒ Input
constructor
A new instance of Input.
- #raw_data=(raw_data) ⇒ Object
Methods included from Coercions
#cleaned_data, #coerce, #coerce!, #coercions, coercions, included
Methods included from Validations
#errors, register_validation, #valid?, #validate, #validations
Methods included from Rendering
Constructor Details
#initialize(name, attributes = Hash.new, raw_data = nil) ⇒ Input
Returns a new instance of Input.
148 149 150 |
# File 'lib/formidable/elements.rb', line 148 def initialize(name, attributes = Hash.new, raw_data = nil) super(:input, name, attributes, raw_data) end |
Instance Method Details
#raw_data=(raw_data) ⇒ Object
152 153 154 |
# File 'lib/formidable/elements.rb', line 152 def raw_data=(raw_data) self.attributes[:value] = super(raw_data) end |