class Nokogiri::XML::Reader

def attributes

(Hash) Attribute names and values, and namespace prefixes and hrefs.
[Returns]

This is the union of Reader#attribute_hash and Reader#namespaces

Get the attributes and namespaces of the current node as a Hash.
def attributes
  attribute_hash.merge(namespaces)
end