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.



50
51
52
# File 'lib/upkeep/targeting.rb', line 50

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

Instance Method Details

#apply(patches) ⇒ Object



54
55
56
57
# File 'lib/upkeep/targeting.rb', line 54

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