# File lib/needle/lifecycle/proxy.rb, line 45 def method_missing( sym, *args, &block ) unless @instance || @instantiation_failed @mutex.synchronize do unless @instance || @instantiation_failed begin @instance = @callback.call( *@args ) rescue Exception @instantiation_failed = true raise end end end end unless @instantiation_failed @instance.__send__ sym, *args, &block else # just return nil... this way, a failed instantiation won't barf # more than once... I hope... end end