Method: Mongo::Grid#get

Defined in:
lib/mongo/gridfs/grid.rb

#get(id) ⇒ Mongo::GridIO

Read a file from the file store.



82
83
84
85
# File 'lib/mongo/gridfs/grid.rb', line 82

def get(id)
  opts = {:query => {'_id' => id}}.merge!(default_grid_io_opts)
  GridIO.new(@files, @chunks, nil, 'r', opts)
end