Class: Upkeep::Targeting::Patcher
- Inherits:
-
Object
- Object
- Upkeep::Targeting::Patcher
- Defined in:
- lib/upkeep/targeting.rb
Instance Method Summary collapse
- #apply(patches) ⇒ Object
-
#initialize(html) ⇒ Patcher
constructor
A new instance of Patcher.
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 |