Class: MongoDelta::Outlet::Replicator

Inherits:
Base
  • Object
show all
Defined in:
lib/mongo_delta/outlet/replicator.rb

Instance Attribute Summary

Attributes inherited from Base

#collection, #db, #options, #target, #target_collection

Instance Method Summary collapse

Methods inherited from Base

#handles?, #initialize, #ns

Constructor Details

This class inherits a constructor from MongoDelta::Outlet::Base

Instance Method Details

#insert(document) ⇒ Object



7
8
9
# File 'lib/mongo_delta/outlet/replicator.rb', line 7

def insert(document)
  target_collection.save(document)
end

#remove(document) ⇒ Object



11
12
13
# File 'lib/mongo_delta/outlet/replicator.rb', line 11

def remove(document)
  target_collection.remove(document)
end

#update(selector, update) ⇒ Object



15
16
17
# File 'lib/mongo_delta/outlet/replicator.rb', line 15

def update(selector, update)
  target_collection.update(selector, update)
end