Class: Azure::Image

Inherits:
Object
  • Object
show all
Defined in:
lib/azure/image.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image) ⇒ Image

Returns a new instance of Image.



55
56
57
58
59
60
61
62
63
# File 'lib/azure/image.rb', line 55

def initialize(image)
  @category = image.at_css('Category').content
  @label = image.at_css('Label').content
  @name = image.at_css('Name').content
  @os = image.at_css('OS').content
  @location = image.at_css('Location').content.gsub(";", ", ") if image.at_css('Location')
  @eula = image.at_css('Eula').content if image.at_css('Eula')
  @description = image.at_css('Description').content if image.at_css('Description')
end

Instance Attribute Details

#categoryObject

Returns the value of attribute category.



53
54
55
# File 'lib/azure/image.rb', line 53

def category
  @category
end

#descriptionObject

Returns the value of attribute description.



54
55
56
# File 'lib/azure/image.rb', line 54

def description
  @description
end

#eulaObject

Returns the value of attribute eula.



54
55
56
# File 'lib/azure/image.rb', line 54

def eula
  @eula
end

#labelObject

Returns the value of attribute label.



53
54
55
# File 'lib/azure/image.rb', line 53

def label
  @label
end

#locationObject

Returns the value of attribute location.



54
55
56
# File 'lib/azure/image.rb', line 54

def location
  @location
end

#nameObject

Returns the value of attribute name.



54
55
56
# File 'lib/azure/image.rb', line 54

def name
  @name
end

#osObject

Returns the value of attribute os.



54
55
56
# File 'lib/azure/image.rb', line 54

def os
  @os
end