lib/invokr/dependency_injection.rb in invokr-0.9.4 vs lib/invokr/dependency_injection.rb in invokr-0.9.5
- old
+ new
@@ -2,10 +2,10 @@
module DependencyInjection
extend self
def inject obj, using
meth = case obj
- when -> (obj) { obj.respond_to?(:call) } then :inject_proc
+ when lambda { |obj| obj.respond_to?(:call) } then :inject_proc
when Class then :inject_klass
else raise ArgumentError, "can't inject #{obj.inspect}"
end
resolver = build_resolver using
send meth, obj, resolver