Skip to content

Commit b31ea82

Browse files
lukaszreszkefidelmostlyobvious
committed
Rename WithDefaultApplyStrategy -> WithDefaultStrategy
Co-authored-by: Szymon Fiedler <[email protected]> Co-authored-by: Paweł Pacana <[email protected]>
1 parent 1e0d070 commit b31ea82

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

aggregate_root/lib/aggregate_root.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def marshal_load(vars)
7676
end
7777
end
7878

79-
def self.with_default_apply_strategy(strict: true)
79+
def self.with_default_strategy(strict: true)
8080
Module.new do
8181
def self.included(host_class)
8282
host_class.extend OnDSL
@@ -105,6 +105,6 @@ def self.included(host_class)
105105
end
106106

107107
def self.included(host_class)
108-
host_class.include with_default_apply_strategy
108+
host_class.include with_default_strategy
109109
end
110110
end

aggregate_root/spec/aggregate_root_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def expire
6868

6969
it "should ignore missing apply method based on a default non-strict apply strategy" do
7070
klass =
71-
Class.new { include AggregateRoot.with_default_apply_strategy(strict: false) }
71+
Class.new { include AggregateRoot.with_default_strategy(strict: false) }
7272
order = klass.new
7373
spanish_inquisition = Orders::Events::SpanishInquisition.new
7474
expect { order.apply(spanish_inquisition) }.to_not raise_error
@@ -111,7 +111,7 @@ def custom_expired(_event)
111111
end
112112

113113
it "ruby 2.7 compatibility" do
114-
klass = Class.new { include AggregateRoot.with_default_apply_strategy }
114+
klass = Class.new { include AggregateRoot.with_default_strategy }
115115

116116
# This is just a way to ensure that the AggregateMethods was included on
117117
# the klass directly, not that it was an include to the anonymous module.

0 commit comments

Comments
 (0)