Class: Synapse::Command::DuplicationFilter
- Inherits:
-
CommandFilter
- Object
- CommandFilter
- Synapse::Command::DuplicationFilter
- Defined in:
- lib/synapse/command/duplication.rb
Overview
Filter that prevents duplicate commands from reaching the command handlers
Instance Method Summary collapse
-
#filter(command) ⇒ CommandMessage
The command to dispatch on the bus.
- #initialize(recorder) ⇒ undefined constructor
Constructor Details
#initialize(recorder) ⇒ undefined
7 8 9 |
# File 'lib/synapse/command/duplication.rb', line 7 def initialize(recorder) @recorder = recorder end |
Instance Method Details
#filter(command) ⇒ CommandMessage
Returns The command to dispatch on the bus.
13 14 15 16 |
# File 'lib/synapse/command/duplication.rb', line 13 def filter(command) @recorder.record command command end |