Class: Lilu::Replacing

Inherits:
Object
  • Object
show all
Defined in:
lib/lilu.rb

Overview

Helpers

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(renderer, element) ⇒ Replacing

Returns a new instance of Replacing.



125
126
127
128
129
130
131
132
133
# File 'lib/lilu.rb', line 125

def initialize(renderer,element)
  @renderer = renderer
  case element
  when String
    @element = renderer.element_at(element)
  when Hpricot::Elem, Hpricot::Elements
    @element = element
  end
end

Instance Attribute Details

#elementObject (readonly)

Returns the value of attribute element.



124
125
126
# File 'lib/lilu.rb', line 124

def element
  @element
end