Class: XmlPatch::Applicator
- Inherits:
-
Object
- Object
- XmlPatch::Applicator
- Defined in:
- lib/xml_patch/applicator.rb
Instance Method Summary collapse
-
#initialize(patch) ⇒ Applicator
constructor
A new instance of Applicator.
- #to(target_xml) ⇒ Object
Constructor Details
#initialize(patch) ⇒ Applicator
Returns a new instance of Applicator.
6 7 8 |
# File 'lib/xml_patch/applicator.rb', line 6 def initialize(patch) @patch = patch end |
Instance Method Details
#to(target_xml) ⇒ Object
10 11 12 13 14 |
# File 'lib/xml_patch/applicator.rb', line 10 def to(target_xml) target = XmlPatch::XmlDocument.new(target_xml) diff_document.apply_to(target) target.to_xml end |