Method: Dry::Effects::Providers::Resolve#call

Defined in:
lib/dry/effects/providers/resolve.rb

#call(dynamic = EMPTY_HASH, options = EMPTY_HASH) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Yield the block with the handler installed



47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/dry/effects/providers/resolve.rb', line 47

def call(dynamic = EMPTY_HASH, options = EMPTY_HASH)
  @dynamic = dynamic

  if options.fetch(:overridable, false)
    @parent = ::Dry::Effects.yield(Locate) { nil }
  else
    @parent = nil
  end

  yield
ensure
  @dynamic = EMPTY_HASH
end