Class: RailsSimpleEventSourcing::AggregateLinksBuilder
- Inherits:
-
Object
- Object
- RailsSimpleEventSourcing::AggregateLinksBuilder
- Defined in:
- lib/rails_simple_event_sourcing/aggregate_links_builder.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(data) ⇒ AggregateLinksBuilder
constructor
A new instance of AggregateLinksBuilder.
Constructor Details
#initialize(data) ⇒ AggregateLinksBuilder
Returns a new instance of AggregateLinksBuilder.
5 6 7 |
# File 'lib/rails_simple_event_sourcing/aggregate_links_builder.rb', line 5 def initialize(data) @data = data end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 |
# File 'lib/rails_simple_event_sourcing/aggregate_links_builder.rb', line 9 def call return {} if @data.blank? @data.filter_map { |key, value| entry_for(key.to_s, value) }.to_h end |