Class: Dropbox::SpaceUsage

Inherits:
Object
  • Object
show all
Defined in:
lib/dropbox/account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#allocatedObject (readonly)

Returns the value of attribute allocated.



39
40
41
# File 'lib/dropbox/account.rb', line 39

def allocated
  @allocated
end

#allocationObject (readonly)

Returns the value of attribute allocation.



39
40
41
# File 'lib/dropbox/account.rb', line 39

def allocation
  @allocation
end

#usedObject (readonly)

Returns the value of attribute used.



39
40
41
# File 'lib/dropbox/account.rb', line 39

def used
  @used
end