class PageBuilder::Elements::Input

Creates anchor nodes and adds some helper methods for commonly used attributes

Public Class Methods

new(parent_or_doc) click to toggle source

We have to override new because nokogiri creates the nodes before calling initialize @param parent_or_doc [Nokogiri::XML::Node, Nokogiri::XML::Document] something to pull the current document from

Calls superclass method
# File lib/pagebuilder/elements/input.rb, line 13
def self.new(parent_or_doc)
  super('input', parent_or_doc)
end

Public Instance Methods

type() click to toggle source

Gets the current type attribute's value @return [String, nil]

# File lib/pagebuilder/elements/input.rb, line 19
def type
  self['type']
end
type=(type) click to toggle source

Sets the type attribute's value @param type [String] the type of the input @return void

# File lib/pagebuilder/elements/input.rb, line 26
def type=(type)
  self['type'] = type
end
value() click to toggle source

Gets the current value attribute's value @return [String, nil]

# File lib/pagebuilder/elements/input.rb, line 32
def value
  self['value']
end
value=(value) click to toggle source

Sets the value attribute's value @param value [String] the value for this input @return void

# File lib/pagebuilder/elements/input.rb, line 39
def value=(value)
  self['value'] = value
end