Sha256: 56c6ba25a54d3da543e3da3e29c8e4f79feb244ec69272030e528af0cf1be385

Contents?: true

Size: 425 Bytes

Versions: 4

Compression:

Stored size: 425 Bytes

Contents

class SmartIoC::BeanFileLoader
  def initialize
    @loaded_locations = {}
  end

  # @param bean_name [Symbol] bean name
  # return nil
  def require_bean(bean_name)
    locations = SmartIoC::BeanLocations.get_bean_locations(bean_name).values.flatten

    locations.each do |location|
      next if @loaded_locations.has_key?(location)
      @loaded_locations[location] = true
      load location
    end

    nil
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
smart_ioc-0.1.21 lib/smart_ioc/bean_file_loader.rb
smart_ioc-0.1.20 lib/smart_ioc/bean_file_loader.rb
smart_ioc-0.1.19 lib/smart_ioc/bean_file_loader.rb
smart_ioc-0.1.18 lib/smart_ioc/bean_file_loader.rb