Class: LazyList::MemoPromise
Overview
A promise that can be evaluated on demand (if forced), that caches its value.
Instance Method Summary collapse
-
#__value__ ⇒ Object
Return the value of this Promise and memoize it for later access.
Methods inherited from Promise
Constructor Details
This class inherits a constructor from LazyList::Promise
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class LazyList::Promise
Instance Method Details
#__value__ ⇒ Object
Return the value of this Promise and memoize it for later access.
221 222 223 224 225 226 227 |
# File 'lib/lazylist.rb', line 221 def __value__ if defined?(@value) @value else @value = super end end |