instance method get_attributes

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.2.3 Private

Signature

get_attributes(node)

Converts the attributes array of a document node into a Hash. Returns an empty Hash, if node has no attributes.

node

Document node to extract attributes from.

Parameters

node req
Source
# File activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb, line 706
  def get_attributes(node)
    attributes = {}
    node.attributes.each { |n,v| attributes[n] = v }
    attributes
  end

Defined in activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb line 706 · View on GitHub · Improve this page · Find usages on GitHub

Defined in XmlSimple

Type at least 2 characters to search.

↑↓ navigate · open · esc close