Sha256: 357f85dd351e891ecc566459b984d11aad697770da670f22b0c84211a42df271

Contents?: true

Size: 926 Bytes

Versions: 3

Compression:

Stored size: 926 Bytes

Contents

require 'concurrent'
require 'dry-configurable'
require 'dry/container/error'
require 'dry/container/item'
require 'dry/container/namespace'
require 'dry/container/registry'
require 'dry/container/resolver'
require 'dry/container/namespace_dsl'
require 'dry/container/mixin'
require 'dry/container/version'

# A collection of micro-libraries, each intended to encapsulate
# a common task in Ruby
module Dry
  # Inversion of Control (IoC) container
  #
  # @example
  #
  #   container = Dry::Container.new
  #   container.register(:item, 'item')
  #   container.resolve(:item)
  #   => 'item'
  #
  #   container.register(:item1, -> { 'item' })
  #   container.resolve(:item1)
  #   => 'item'
  #
  #   container.register(:item2, -> { 'item' }, call: false)
  #   container.resolve(:item2)
  #   => #<Proc:0x007f33b169e998@(irb):10 (lambda)>
  #
  # @api public
  class Container
    include ::Dry::Container::Mixin
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dry-container-0.6.0 lib/dry/container.rb
dry-container-0.5.0 lib/dry/container.rb
dry-container-0.4.0 lib/dry/container.rb