Class: Hyperb::Volume
- Inherits:
-
Object
- Object
- Hyperb::Volume
- Includes:
- Utils
- Defined in:
- lib/hyperb/volumes/volume.rb
Overview
volume object
Instance Attribute Summary collapse
-
#driver ⇒ Object
Returns the value of attribute driver.
-
#labels ⇒ Object
Returns the value of attribute labels.
-
#mountpoint ⇒ Object
Returns the value of attribute mountpoint.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Volume
constructor
A new instance of Volume.
Methods included from Utils
#camelize, #check_arguments, #downcase_symbolize, #prepare_json, #underscore
Constructor Details
#initialize(attrs = {}) ⇒ Volume
Returns a new instance of Volume.
9 10 11 12 13 14 |
# File 'lib/hyperb/volumes/volume.rb', line 9 def initialize(attrs = {}) attrs.each do |att, value| value = downcase_symbolize(value) if value.is_a?(Hash) instance_variable_set("@#{att.downcase.to_sym}", value) end end |
Instance Attribute Details
#driver ⇒ Object
Returns the value of attribute driver.
7 8 9 |
# File 'lib/hyperb/volumes/volume.rb', line 7 def driver @driver end |
#labels ⇒ Object
Returns the value of attribute labels.
7 8 9 |
# File 'lib/hyperb/volumes/volume.rb', line 7 def labels @labels end |
#mountpoint ⇒ Object
Returns the value of attribute mountpoint.
7 8 9 |
# File 'lib/hyperb/volumes/volume.rb', line 7 def mountpoint @mountpoint end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/hyperb/volumes/volume.rb', line 7 def name @name end |