lib/garcon/core_ext/lazy.rb
# Forces the result of a promise to be computed (if necessary) and returns
# the bare result object.  Once evaluated, the result of the promise will
# be cached.  Nested promises will be evaluated together, until the first
# non-promise result.
#
# If called on a value that is not a promise, it will simply return it.
#
Forces the result of a promise to be computed (if necessary) and returns
the bare result object.  Once evaluated, the result of the promise will
be cached.  Nested promises will be evaluated together, until the first
non-promise result.

If called on a value that is not a promise, it will simply return it.
Forces the result of a promise to be computed ( if necessary ) and returns the bare result object . Once evaluated the result of the promise will be cached . Nested promises will be evaluated together until the first non - promise result . If called on a value that is not a promise it will simply return it .
def demand(promise)
    if promise.respond_to? :__result__
      promise.__result__
    else
      promise
    end
  end
def demand ( promise ) if promise . respond_to? :__result__ promise . __result__ else promise end end
Forces the result of a promise to be computed (if necessary) and returns
the bare result object.
Forces the result of a promise to be computed ( if necessary ) and returns the bare result object .
promise
<not_specific>