Proc
This class is a special kind of Proc object, that uses instance_eval to execute a code block.
Creates a ListBuilderProc working on the list builder lb using the Proc returned by lb.#{name}. name has to be either :filter or :transform.
# File lib/lazylist/list_builder.rb, line 50 def initialize(lb, name, &block) @name = name @lb = lb @method_missing_delegator = block_self(&block) super(&@lb.__send__(@name)) end
Call this ListBuilderProc instance with the arguments args, which have to be the ordered values of the variables.
# File lib/lazylist/list_builder.rb, line 59 def call(*args) prepare_variables @lb.variables.each_with_index do |var, i| instance_variable_set "@#{var}", args[i] end instance_eval(&@lb.__send__(@name)) end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.