lib/invokr/dependency_injection.rb in invokr-0.9.3 vs lib/invokr/dependency_injection.rb in invokr-0.9.4

- old
+ new

@@ -2,10 +2,10 @@ module DependencyInjection extend self def inject obj, using meth = case obj - when Proc then :inject_proc + when -> (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