Module: VCloud::ParsesXml::ClassMethods
- Defined in:
- lib/vcloud/parses_xml.rb
Instance Method Summary collapse
Instance Method Details
#from_xml(xml) ⇒ Object
24 25 26 |
# File 'lib/vcloud/parses_xml.rb', line 24 def from_xml(xml) parse(xml) end |
#has_default_attributes ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/vcloud/parses_xml.rb', line 15 def has_default_attributes self.class_eval do attribute :id, 'String' attribute :type, 'String' attribute :name, 'String' attribute :href, 'String' end end |
#has_links ⇒ Object
9 10 11 12 13 |
# File 'lib/vcloud/parses_xml.rb', line 9 def has_links self.class_eval do has_many :links, 'VCloud::Link', :xpath => '.' end end |