Method: Xcop::Document#diff
- Defined in:
- lib/xcop/document.rb
#diff(nocolor: false) ⇒ Object
Return the difference, if any (empty string if everything is clean).
38 39 40 41 42 43 |
# File 'lib/xcop/document.rb', line 38 def diff(nocolor: false) xml = Nokogiri::XML(File.open(@path), &:noblanks) ideal = xml.to_xml(indent: 2) now = File.read(@path) differ(ideal, now, nocolor: nocolor) end |