Class: Fog::Generators::Compute::VcloudDirector::Vapp
- Inherits:
-
Object
- Object
- Fog::Generators::Compute::VcloudDirector::Vapp
- Defined in:
- lib/fog/vcloud_director/generators/compute/vapp.rb
Overview
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #generate_xml ⇒ Object
-
#initialize(name, options = {}) ⇒ Vapp
constructor
A new instance of Vapp.
Constructor Details
#initialize(name, options = {}) ⇒ Vapp
Returns a new instance of Vapp.
9 10 11 12 |
# File 'lib/fog/vcloud_director/generators/compute/vapp.rb', line 9 def initialize(name, ={}) @name = name @options = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/fog/vcloud_director/generators/compute/vapp.rb', line 7 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/fog/vcloud_director/generators/compute/vapp.rb', line 7 def @options end |
Instance Method Details
#generate_xml ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/fog/vcloud_director/generators/compute/vapp.rb', line 14 def generate_xml attrs = @attrs Nokogiri::XML::Builder.new do VApp('xmlns' => 'http://www.vmware.com/vcloud/v1.5', 'name' => name ) { Description [:Description] if .key?(:Description) } end.to_xml end |