From 03d70c649f838f16e50f759fcd0ca749be55fed8 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Sat, 31 Jan 2015 08:08:38 -0800 Subject: [PATCH] Adds updater_proc, to simplify the setup of credentials during stub creation --- src/ruby/lib/grpc/auth/signet.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ruby/lib/grpc/auth/signet.rb b/src/ruby/lib/grpc/auth/signet.rb index 1a2e5644e21..a8bce1255c2 100644 --- a/src/ruby/lib/grpc/auth/signet.rb +++ b/src/ruby/lib/grpc/auth/signet.rb @@ -56,6 +56,12 @@ module Signet apply!(a_copy, opts) a_copy end + + # Returns a reference to the #apply method, suitable for passing as + # a closure + def updater_proc + lambda(&method(:apply)) + end end end end