Class: Aeolus::Image::Warehouse::Template

Inherits:
WarehouseModel show all
Defined in:
lib/aeolus_image/model/warehouse/template.rb

Instance Attribute Summary collapse

Attributes inherited from WarehouseModel

#body

Instance Method Summary collapse

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_bodyObject (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

#nameObject



29
30
31
# File 'lib/aeolus_image/model/warehouse/template.rb', line 29

def name
  @name ||= @xml_body.xpath("/template/name").text
end