lib/dry/effects/providers/implicit.rb in dry-effects-0.1.0.alpha2 vs lib/dry/effects/providers/implicit.rb in dry-effects-0.1.0

- old
+ new

@@ -16,19 +16,25 @@ def implicit(arg) dictionary.fetch(arg.class) end + # Yield the block with the handler installed + # + # @api private def call(stack, dynamic = EMPTY_HASH) if dynamic.empty? @dictionary = static else @dictionary = static.merge(dynamic) end super(stack) end + # @param [Effect] effect + # @return [Boolean] + # @api public def provide?(effect) super && dependency.equal?(effect.dependency) && dictionary.key?(effect.payload[0].class) end