Method: Ccrpc::Promise.demand

Defined in:
lib/ccrpc/lazy.rb

.demand(promise) ⇒ Object



127
128
129
130
131
132
133
# File 'lib/ccrpc/lazy.rb', line 127

def self.demand( promise )
  if promise.respond_to? :__result__
    promise.__result__
  else # not really a promise
    promise
  end
end