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.
10 11 12 13 |
# File 'lib/fog/vcloud_director/generators/compute/vapp.rb', line 10 def initialize(name, ={}) @name = name @options = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/fog/vcloud_director/generators/compute/vapp.rb', line 8 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/fog/vcloud_director/generators/compute/vapp.rb', line 8 def @options end |
Instance Method Details
#generate_xml ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/fog/vcloud_director/generators/compute/vapp.rb', line 15 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 |