Class: Azure::Image
- Inherits:
-
Object
- Object
- Azure::Image
- Defined in:
- lib/azure/image.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#description ⇒ Object
Returns the value of attribute description.
-
#eula ⇒ Object
Returns the value of attribute eula.
-
#label ⇒ Object
Returns the value of attribute label.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#os ⇒ Object
Returns the value of attribute os.
Instance Method Summary collapse
-
#initialize(image) ⇒ Image
constructor
A new instance of Image.
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
#category ⇒ Object
Returns the value of attribute category.
53 54 55 |
# File 'lib/azure/image.rb', line 53 def category @category end |
#description ⇒ Object
Returns the value of attribute description.
54 55 56 |
# File 'lib/azure/image.rb', line 54 def description @description end |
#eula ⇒ Object
Returns the value of attribute eula.
54 55 56 |
# File 'lib/azure/image.rb', line 54 def eula @eula end |
#label ⇒ Object
Returns the value of attribute label.
53 54 55 |
# File 'lib/azure/image.rb', line 53 def label @label end |
#location ⇒ Object
Returns the value of attribute location.
54 55 56 |
# File 'lib/azure/image.rb', line 54 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
54 55 56 |
# File 'lib/azure/image.rb', line 54 def name @name end |
#os ⇒ Object
Returns the value of attribute os.
54 55 56 |
# File 'lib/azure/image.rb', line 54 def os @os end |