lib/kitchen/patches/nokogiri.rb
# Alphabetizes all attributes within the document, useful for comparing one
# document to another (since attribute order isn't meaningful)
#
Alphabetizes all attributes within the document, useful for comparing one
document to another (since attribute order isn't meaningful)
Alphabetizes all attributes within the document useful for comparing one document to another ( since attribute order isn ' t meaningful )
def alphabetize_attributes!
        traverse do |child|
          next if child.text? || child.document?
          child_attributes = child.attributes
          child_attributes.each do |key, _value|
            child.remove_attribute(key)
          end
          sorted_keys = child_attributes.keys.sort
          sorted_keys.each do |key|
            value = child_attributes[key].to_s
            child[key] = value
          end
        end
      end
def alphabetize_attributes! traverse do | child | next if child . text? || child . document? child_attributes = child . attributes child_attributes . each do | key , _value | child . remove_attribute ( key ) end sorted_keys = child_attributes . keys . sort sorted_keys . each do | key | value = child_attributes [ key ] . to_s child [ key ] = value end end end
Alphabetizes all attributes within the document, useful for comparing one
document to another (since attribute order isn't meaningful)
Alphabetizes all attributes within the document useful for comparing one document to another ( since attribute order isn ' t meaningful )