Class: Mongoo::GridFs::Files
- Inherits:
-
Object
- Object
- Mongoo::GridFs::Files
- Defined in:
- lib/mongoo/grid_fs/files.rb
Instance Method Summary collapse
- #delete(*args) ⇒ Object
- #get(*args) ⇒ Object
-
#initialize(container_hash, db_lambda) ⇒ Files
constructor
A new instance of Files.
- #put(*args) ⇒ Object
Constructor Details
#initialize(container_hash, db_lambda) ⇒ Files
Returns a new instance of Files.
5 6 7 8 |
# File 'lib/mongoo/grid_fs/files.rb', line 5 def initialize(container_hash, db_lambda) @db_lambda = db_lambda @container_hash = container_hash end |
Instance Method Details
#delete(*args) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/mongoo/grid_fs/files.rb', line 25 def delete(*args) key = args.shift if @container_hash[key] Mongoo::GridFs::File.new(@container_hash[key], @db_lambda).delete(*args) end end |