Class: Duracloud::StorageReport

Inherits:
Hashie::Trash
  • Object
show all
Defined in:
lib/duracloud/storage_report.rb

Instance Method Summary collapse

Instance Method Details

#timeObject



13
14
15
# File 'lib/duracloud/storage_report.rb', line 13

def time
  @time ||= Time.at(timestamp / 1000.0).utc
end

#to_sObject



17
18
19
20
21
22
23
24
25
# File 'lib/duracloud/storage_report.rb', line 17

def to_s
  <<-EOS
Date:       #{time}
Space ID:   #{space_id || "(all)"}
Store ID:   #{store_id}
Objects:    #{object_count}
Total size: #{byte_count} bytes
  EOS
end