Class: Horseman::Dom::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/horseman/dom/element.rb

Direct Known Subclasses

Form, FormField

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id = '', name = '') ⇒ Element

Returns a new instance of Element.



5
6
7
8
# File 'lib/horseman/dom/element.rb', line 5

def initialize(id='', name='')
  @id = id
  @name = name
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/horseman/dom/element.rb', line 4

def id
  @id
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/horseman/dom/element.rb', line 4

def name
  @name
end