Method: Domle::Element#initialize

Defined in:
lib/domle.rb

#initialize(name = nil, value: nil, attributes: Attributes.new(parent: self), rexle: nil) ⇒ Element

Returns a new instance of Element.



58
59
60
61
62
63
64
# File 'lib/domle.rb', line 58

def initialize(name=nil, value: nil, \
                      attributes: Attributes.new(parent: self), rexle: nil)
  
  attributes.merge!(style: '') unless attributes.has_key? :style
  super(name, value: value, attributes: attributes, rexle: rexle)
  
end