Method: FakeS3::FileStore#initialize
- Defined in:
- lib/fakes3/file_store.rb
#initialize(root, quiet_mode) ⇒ FileStore
Returns a new instance of FileStore.
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fakes3/file_store.rb', line 19 def initialize(root, quiet_mode) @root = root @buckets = [] @bucket_hash = {} @quiet_mode = quiet_mode Dir[File.join(root,"*")].each do |bucket| bucket_name = File.basename(bucket) bucket_obj = Bucket.new(bucket_name,Time.now,[]) @buckets << bucket_obj @bucket_hash[bucket_name] = bucket_obj end end |