class HippoXmlParser::Property
Attributes
doc[RW]
name[RW]
namespace[RW]
value[RW]
Public Class Methods
new(doc)
click to toggle source
# File lib/hippo_xml_parser/property.rb, line 4 def initialize(doc) @doc = doc @namespace, @name = doc["sv:name"].split(':') @value = doc.children.detect {|x| x.name == "value" }.children.to_s rescue nil end
Public Instance Methods
[](key)
click to toggle source
# File lib/hippo_xml_parser/property.rb, line 10 def [](key) doc[key] end
inspect()
click to toggle source
# File lib/hippo_xml_parser/property.rb, line 14 def inspect "#<Property name=#{name.inspect} value=#{value.inspect}>" end