Class: RailsSimpleEventSourcing::EventSearch
- Inherits:
-
Object
- Object
- RailsSimpleEventSourcing::EventSearch
- Defined in:
- lib/rails_simple_event_sourcing/event_search.rb
Constant Summary collapse
- KEY_VALUE_PATTERN =
/\A([^:]+):(.+)\z/
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(scope:, type: nil, aggregate: nil, query: nil) ⇒ EventSearch
constructor
A new instance of EventSearch.
Constructor Details
#initialize(scope:, type: nil, aggregate: nil, query: nil) ⇒ EventSearch
Returns a new instance of EventSearch.
7 8 9 10 11 12 |
# File 'lib/rails_simple_event_sourcing/event_search.rb', line 7 def initialize(scope:, type: nil, aggregate: nil, query: nil) @scope = scope @type = type @aggregate = aggregate @query = query&.strip end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 |
# File 'lib/rails_simple_event_sourcing/event_search.rb', line 14 def call filter_by_type filter_by_aggregate filter_by_query @scope end |