Sha256: c630ac6236fd4468a005caa860f9a1629fc65da7039c81d103577bc8a4bc91c0

Contents?: true

Size: 1.03 KB

Versions: 5

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

require 'smart_core/container'
require 'set'

# @api public
# @since 0.1.0
module SmartCore
  # TODO: обязательно учесть наследование

  class << self
    # @param containers [Array<SmartCore::Container>]
    # @return [Module]
    #
    # @api public
    # @since 0.1.0
    # rubocop:disable Naming/MethodName
    def Injection(*containers)
      ::SmartCore::Injection::Injector::Modulizer.with_containers(containers)
    end
    # rubocop:enable Naming/MethodName
  end

  # @api public
  # @since 0.1.0
  module Injection
    require_relative 'injection/version'
    require_relative 'injection/errors'
    require_relative 'injection/injector'
    require_relative 'injection/locator'
    require_relative 'injection/dsl'

    class << self
      # @param base_klass [Class, Module]
      # @return [void]
      #
      # @api private
      # @since 0.1.0
      def included(base_klass)
        ::SmartCore::Injection::Injector::Modulizer.inject_to(base_klass)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
smart_injection-0.3.0 lib/smart_core/injection.rb
smart_injection-0.2.0 lib/smart_core/injection.rb
smart_injection-0.1.0 lib/smart_core/injection.rb
smart_injection-0.0.0.alpha3 lib/smart_core/injection.rb
smart_injection-0.0.0.alpha2 lib/smart_core/injection.rb