In Files

Parent

Files

LazyList::Promise

A promise that can be evaluated on demand (if forced).

Public Class Methods

new(&block) click to toggle source

(Not documented)

# File lib/lazylist.rb, line 21
    def initialize(&block)
      @block = block
    end

Public Instance Methods

__value__() click to toggle source

Return the value of this Promise.

# File lib/lazylist.rb, line 26
    def __value__
      case v = @block.call
      when Promise
        v.__value__
      else
        v
      end
    end
method_missing( *args, &block ) click to toggle source

Redirect all missing methods to the value of this Promise.

# File lib/lazylist.rb, line 36
    def method_missing( *args, &block )
      __value__.__send__( *args, &block )
    end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.