lazy load s3 file bodies

This commit is contained in:
geemus (Wesley Beary) 2010-02-19 11:30:23 -08:00
parent 20ad3ea834
commit 9a4d1e4778
1 changed files with 8 additions and 0 deletions

View File

@ -15,6 +15,14 @@ module Fog
attribute :size, 'Size'
attribute :storage_class, 'StorageClass'
def body
@body ||= if last_modified
collection.get(identity).body
else
''
end
end
def directory
@directory
end