Class: VCloud::Reference
- Inherits:
-
Object
- Object
- VCloud::Reference
- Includes:
- HappyMapper
- Defined in:
- lib/vcloud/user/reference.rb
Overview
A reference to a resource. Contains an href attribute and optional name and type attributes.
Class Method Summary collapse
-
.from_xml(xml) ⇒ VCloud::Reference
Parse a VCloud::Reference from XML.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Reference
constructor
A new instance of Reference.
Constructor Details
#initialize(args = {}) ⇒ Reference
Returns a new instance of Reference.
12 13 14 15 16 17 |
# File 'lib/vcloud/user/reference.rb', line 12 def initialize(args = {}) @rel = args[:id] @type = args[:type] @name = args[:name] @href = args[:href] end |
Class Method Details
.from_xml(xml) ⇒ VCloud::Reference
Parse a VCloud::Reference from XML
23 24 25 |
# File 'lib/vcloud/user/reference.rb', line 23 def self.from_xml(xml) parse(xml) end |