Class: Hyperb::Volume

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
lib/hyperb/volumes/volume.rb

Overview

volume object

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#driverObject

Returns the value of attribute driver.



7
8
9
# File 'lib/hyperb/volumes/volume.rb', line 7

def driver
  @driver
end

#labelsObject

Returns the value of attribute labels.



7
8
9
# File 'lib/hyperb/volumes/volume.rb', line 7

def labels
  @labels
end

#mountpointObject

Returns the value of attribute mountpoint.



7
8
9
# File 'lib/hyperb/volumes/volume.rb', line 7

def mountpoint
  @mountpoint
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/hyperb/volumes/volume.rb', line 7

def name
  @name
end