A Dry::Container acts as an Inversion of Control (IoC) container, allowing you to register dependencies and resolve them later. You can register static values or procs/lambdas. By default, when you resolve a proc, the container calls it and returns the result. If you want to register the proc itself without executing it, use the call: false option.
container = Dry::Container.new
# Register a static value
container.register(:item, 'item')
container.resolve(:item)
# => 'item'
# Register a proc (executes on resolution by default)
container.register(:item1, -> { 'item' })
container.resolve(:item1)
# => 'item'
# Register a proc without executing it
container.register(:item2, -> { 'item' }, call: false)
container.resolve(:item2)
# => #<Proc:0x...>