Class: Manufacturable::Injector

Inherits:
Object
  • Object
show all
Defined in:
lib/manufacturable/injector.rb

Class Method Summary collapse

Class Method Details

.inject(klass, *args, **kwargs) ⇒ Object



6
7
8
9
# File 'lib/manufacturable/injector.rb', line 6

def inject(klass, *args, **kwargs)
  params = dependencies_for(klass).merge(**kwargs)
  klass.new(*args, **params)
end