Class: Upkeep::Targeting::Patcher

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

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ Patcher

Returns a new instance of Patcher.



48
49
50
# File 'lib/upkeep/targeting.rb', line 48

def initialize(html)
  @fragment = Extraction.parse_html(html)
end

Instance Method Details

#apply(patches) ⇒ Object



52
53
54
55
# File 'lib/upkeep/targeting.rb', line 52

def apply(patches)
  patches.each { |patch| apply_patch(patch) }
  fragment.to_html
end