Class: PageBuilder::Elements::Input
- Defined in:
- lib/pagebuilder/elements/input.rb
Overview
Creates anchor nodes and adds some helper methods for commonly used attributes
Direct Known Subclasses
PageBuilder::Elements::Inputs::Checkbox, PageBuilder::Elements::Inputs::Email, PageBuilder::Elements::Inputs::File, PageBuilder::Elements::Inputs::Hidden, PageBuilder::Elements::Inputs::Password, PageBuilder::Elements::Inputs::RadioButton, PageBuilder::Elements::Inputs::Search, PageBuilder::Elements::Inputs::SubmitButton, PageBuilder::Elements::Inputs::Text
Class Method Summary collapse
-
.new(parent_or_doc) ⇒ Object
We have to override #new because nokogiri creates the nodes before calling initialize.
Instance Method Summary collapse
-
#type ⇒ String?
Gets the current type attribute’s value.
-
#type=(type) ⇒ Object
Sets the type attribute’s value.
-
#value ⇒ String?
Gets the current value attribute’s value.
-
#value=(value) ⇒ Object
Sets the value attribute’s value.
Methods inherited from Basic
Class Method Details
.new(parent_or_doc) ⇒ Object
We have to override #new because nokogiri creates the nodes before calling initialize
13 14 15 |
# File 'lib/pagebuilder/elements/input.rb', line 13 def self.new(parent_or_doc) super('input', parent_or_doc) end |
Instance Method Details
#type ⇒ String?
Gets the current type attribute’s value
19 20 21 |
# File 'lib/pagebuilder/elements/input.rb', line 19 def type self['type'] end |
#type=(type) ⇒ Object
Sets the type attribute’s value
26 27 28 |
# File 'lib/pagebuilder/elements/input.rb', line 26 def type=(type) self['type'] = type end |
#value ⇒ String?
Gets the current value attribute’s value
32 33 34 |
# File 'lib/pagebuilder/elements/input.rb', line 32 def value self['value'] end |
#value=(value) ⇒ Object
Sets the value attribute’s value
39 40 41 |
# File 'lib/pagebuilder/elements/input.rb', line 39 def value=(value) self['value'] = value end |