class Nokogiri::XML::Node

def diff(other,options={},&block)

Returns:
  • (Enumerator) -

Other tags:
    Yieldparam: node -
    Yieldparam: change -

Other tags:
    Yield: -

Options Hash: (**options)
  • :removed (Boolean) --
  • :added (Boolean) --

Parameters:
  • options (Hash) --
  • other (Nokogiri::XML::Node) --
def diff(other,options={},&block)
  return enum_for(:diff,other,options) unless block
  if (options[:added] || options[:removed])
    tdiff_unordered(other) do |change,node|
      if (change == '+' && options[:added])
        yield change, node
      elsif (change == '-' && options[:removed])
        yield change, node
      end
    end
  else
    tdiff(other,&block)
  end
end