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.
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 |