Class: DatabaseFlusher::Mongoid::DeletionStrategy::Subscriber
- Inherits:
-
Object
- Object
- DatabaseFlusher::Mongoid::DeletionStrategy::Subscriber
- Defined in:
- lib/database_flusher/mongoid/deletion_strategy.rb
Instance Method Summary collapse
-
#initialize(strategy) ⇒ Subscriber
constructor
A new instance of Subscriber.
- #started(event) ⇒ Object
Constructor Details
#initialize(strategy) ⇒ Subscriber
Returns a new instance of Subscriber.
8 9 10 |
# File 'lib/database_flusher/mongoid/deletion_strategy.rb', line 8 def initialize(strategy) @strategy = strategy end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object (private)
21 22 |
# File 'lib/database_flusher/mongoid/deletion_strategy.rb', line 21 def method_missing(*args, &block) end |
Instance Method Details
#started(event) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/database_flusher/mongoid/deletion_strategy.rb', line 12 def started(event) collection = event.command['insert'.freeze] if collection @strategy.collections << collection end end |