Class: Gobbler::Volume
- Includes:
- Mappable
- Defined in:
- lib/gobbler/volume.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.list(opts = {}) ⇒ Array<Volume>
An array of volumes.
Instance Method Summary collapse
-
#connected? ⇒ Boolean
If the volume is currently connected to a machine.
Methods included from Mappable
#city, #coordinates, included, #lat, #lng, #zip
Methods inherited from Base
Constructor Details
This class inherits a constructor from Gobbler::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Gobbler::Base
Class Method Details
.list(opts = {}) ⇒ Array<Volume>
Returns an array of volumes.
19 20 21 22 |
# File 'lib/gobbler/volume.rb', line 19 def self.list(opts = {}) opts[:offset] ||= 0 ::Gobbler.request("client_volume/sync_ask", options: opts)["updates"].map {|volume| new(volume)} end |
Instance Method Details
#connected? ⇒ Boolean
Returns If the volume is currently connected to a machine.
25 26 27 |
# File 'lib/gobbler/volume.rb', line 25 def connected? currently_connected end |