Class: Gobbler::Quota
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.get ⇒ Quota
The transfer and storage quota for your account.
Instance Method Summary collapse
-
#storage ⇒ Integer
The total bytes you can backup (note -1 represents unlimted).
-
#transfer ⇒ Integer
The total bytes you can sending (note -1 represents unlimted).
-
#unlimited_transfer? ⇒ Boolean
If your account has unlimited sending.
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
.get ⇒ Quota
Returns The transfer and storage quota for your account.
9 10 11 |
# File 'lib/gobbler/quota.rb', line 9 def self.get new(::Gobbler.request("v1/quotas")) end |
Instance Method Details
#storage ⇒ Integer
Returns The total bytes you can backup (note -1 represents unlimted).
24 25 26 |
# File 'lib/gobbler/quota.rb', line 24 def storage quotas["limits"]["storage"] end |
#transfer ⇒ Integer
Returns The total bytes you can sending (note -1 represents unlimted).
14 15 16 |
# File 'lib/gobbler/quota.rb', line 14 def transfer quotas["limits"]["transfer"] end |
#unlimited_transfer? ⇒ Boolean
Returns If your account has unlimited sending.
19 20 21 |
# File 'lib/gobbler/quota.rb', line 19 def unlimited_transfer? transfer == -1 end |