Class: Aeolus::Image::Warehouse::Template
- Inherits:
-
WarehouseModel
- Object
- WarehouseModel
- Aeolus::Image::Warehouse::Template
- Defined in:
- lib/aeolus_image/model/warehouse/template.rb
Instance Attribute Summary collapse
-
#xml_body ⇒ Object
readonly
Returns the value of attribute xml_body.
Attributes inherited from WarehouseModel
Instance Method Summary collapse
-
#initialize(obj) ⇒ Template
constructor
A new instance of Template.
- #name ⇒ Object
Methods inherited from WarehouseModel
#==, all, #bucket_object, bucket_objects, config, config=, create!, delete, find, first, #id, iwhd_url, last, oauth_consumer_key, oauth_consumer_secret, #set_attr, set_warehouse_and_bucket, use_oauth?, where
Constructor Details
#initialize(obj) ⇒ Template
Returns a new instance of Template.
23 24 25 26 27 |
# File 'lib/aeolus_image/model/warehouse/template.rb', line 23 def initialize(obj) super @body = obj.body @xml_body = Nokogiri::XML @body end |
Instance Attribute Details
#xml_body ⇒ Object (readonly)
Returns the value of attribute xml_body.
19 20 21 |
# File 'lib/aeolus_image/model/warehouse/template.rb', line 19 def xml_body @xml_body end |
Instance Method Details
#name ⇒ Object
29 30 31 |
# File 'lib/aeolus_image/model/warehouse/template.rb', line 29 def name @name ||= @xml_body.xpath("/template/name").text end |