Class: Dropbox::SpaceUsage
- Inherits:
-
Object
- Object
- Dropbox::SpaceUsage
- Defined in:
- lib/dropbox/account.rb
Instance Attribute Summary collapse
-
#allocated ⇒ Object
readonly
Returns the value of attribute allocated.
-
#allocation ⇒ Object
readonly
Returns the value of attribute allocation.
-
#used ⇒ Object
readonly
Returns the value of attribute used.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ SpaceUsage
constructor
A new instance of SpaceUsage.
Constructor Details
#initialize(attrs = {}) ⇒ SpaceUsage
Returns a new instance of SpaceUsage.
41 42 43 44 45 |
# File 'lib/dropbox/account.rb', line 41 def initialize(attrs={}) @used = attrs['used'] # Space used in bytes @allocation = attrs['allocation']['.tag'] # The type of allocation @allocated = attrs['allocation']['allocated'] # Space allocated in bytes end |
Instance Attribute Details
#allocated ⇒ Object (readonly)
Returns the value of attribute allocated.
39 40 41 |
# File 'lib/dropbox/account.rb', line 39 def allocated @allocated end |
#allocation ⇒ Object (readonly)
Returns the value of attribute allocation.
39 40 41 |
# File 'lib/dropbox/account.rb', line 39 def allocation @allocation end |
#used ⇒ Object (readonly)
Returns the value of attribute used.
39 40 41 |
# File 'lib/dropbox/account.rb', line 39 def used @used end |