Module: SmartIoC

Defined in:
lib/smart_ioc.rb,
lib/smart_ioc/version.rb,
lib/smart_ioc/container.rb

Defined Under Namespace

Modules: Args, Errors, Iocify, Scopes Classes: BeanDefinition, BeanDefinitionsStorage, BeanDependency, BeanFactory, BeanFileLoader, BeanLocations, BeanLocator, Container, ExtraPackageContexts, InjectMetadata

Constant Summary collapse

VERSION =
"0.1.27"

Class Method Summary collapse

Class Method Details

.clearObject

Full clear of data (mostly for tests)



45
46
47
48
# File 'lib/smart_ioc.rb', line 45

def clear
  BeanLocations.clear
  Container.clear
end

.containerObject



50
51
52
# File 'lib/smart_ioc.rb', line 50

def container
  Container.get_instance
end

.find_package_beans(package_name, dir) ⇒ Object



33
34
35
36
37
# File 'lib/smart_ioc.rb', line 33

def find_package_beans(package_name, dir)
  bean_locator = SmartIoC::BeanLocator.new
  bean_locator.locate_beans(package_name.to_sym, dir)
  nil
end

.load_all_beansObject

Load all beans (usually required for production env)



40
41
42
# File 'lib/smart_ioc.rb', line 40

def load_all_beans
  BeanLocations.load_all
end