Skip to content

Commit

Permalink
restructure method calls
Browse files Browse the repository at this point in the history
  • Loading branch information
hallgren committed Jan 27, 2016
1 parent 94e426c commit e93bf65
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/sandthorn/aggregate_root_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,14 @@ def aggregate_find aggregate_id
def new *args, &block

aggregate = allocate
aggregate.aggregate_base_initialize
aggregate.aggregate_initialize

aggregate.default_attributes if aggregate.respond_to?(:default_attributes)
aggregate.send :initialize, *args, &block

aggregate.send :set_aggregate_id, Sandthorn.generate_aggregate_id

aggregate.aggregate_trace @@aggregate_trace_information do |aggr|

aggr.aggregate_base_initialize
aggr.aggregate_initialize

aggr.send :set_aggregate_id, Sandthorn.generate_aggregate_id
aggr.send :commit, *args
return aggr
end
Expand Down

0 comments on commit e93bf65

Please sign in to comment.