summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrendan Deere <brendan@stembolt.com>2016-10-20 10:24:18 -0700
committerBrendan Deere <brendan@stembolt.com>2016-10-20 10:24:18 -0700
commitdc1bbd95effe94ec402c88e28a5cc9e9373a8860 (patch)
tree3f650ad51189a1cb6d9834b132edca405255391b /lib
parent2532179cbb17a13418d2f3c92a0b61b65e705e2f (diff)
Explicitly capture the default gateway block
This is more clear as to whats happening than implicitly capturing the block
Diffstat (limited to 'lib')
-rw-r--r--lib/solidus_subscriptions/config.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/solidus_subscriptions/config.rb b/lib/solidus_subscriptions/config.rb
index 6ff33d1..4403819 100644
--- a/lib/solidus_subscriptions/config.rb
+++ b/lib/solidus_subscriptions/config.rb
@@ -80,8 +80,9 @@ module SolidusSubscriptions
]
end
- def default_gateway
- block_given? ? @gateway = Proc.new : @gateway.call
+ def default_gateway(&block)
+ return @gateway.call unless block_given?
+ @gateway = block
end
end
end