class Moped::GridFS::Files
Attributes
bucket[R]
Public Class Methods
new(bucket)
click to toggle source
# File lib/moped/gridfs/files.rb, line 12 def initialize(bucket) @bucket = bucket end
Public Instance Methods
[](id)
click to toggle source
# File lib/moped/gridfs/files.rb, line 16 def [](id) bucket.open(id, 'r') end
count()
click to toggle source
# File lib/moped/gridfs/files.rb, line 20 def count files_collection.find.count end
each() { |self[document| ... }
click to toggle source
# File lib/moped/gridfs/files.rb, line 24 def each(&block) files_collection.find.each { |document| yield(self[document['_id']]) } end