Class: Aggregates::CommandFilter

Inherits:
Object
  • Object
show all
Includes:
MessageProcessor, WithAggregateHelpers
Defined in:
lib/aggregates/command_filter.rb

Overview

Applies filters to commands to decouple filtering logic from the CommandProcessor.

Instance Method Summary collapse

Methods included from WithAggregateHelpers

included

Methods included from MessageProcessor

#find_message_handlers, #handle_message, included

Instance Method Details

#allow?(command) ⇒ Boolean



9
10
11
# File 'lib/aggregates/command_filter.rb', line 9

def allow?(command)
  handle_message(command).all?
end