Module: RubyBeans::Injector

Defined in:
lib/ruby_beans/injector.rb

Instance Method Summary collapse

Instance Method Details

#inject(*dependencies) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/ruby_beans/injector.rb', line 3

def inject(*dependencies)
  dependencies.each do |d|
    ds = d.to_s
    define_method(ds) do
      RubyBeans.get_bean ds
    end
  end
end