class Cuenote::Api::Node
Public Class Methods
new(doc=nil)
click to toggle source
# File lib/cuenote/api/node.rb, line 7 def initialize(doc=nil) @doc = case doc when REXML::Element doc when String REXML::Document.new(doc) else REXML::Document.new('<a/>') end end
Public Instance Methods
attributes()
click to toggle source
# File lib/cuenote/api/node.rb, line 19 def attributes @attributes ||= @doc.attributes.inject({}) do |hash, attr| hash[attr[0].to_sym] = attr[1] hash end end
elements()
click to toggle source
# File lib/cuenote/api/node.rb, line 26 def elements @doc.elements end