String
SCRIPT_LINES__ = {} unless defined? SCRIPT_LINES__
Return a lambda
# File lib/proc_source.rb, line 36 def to_lambda to_proc "lambda" end
Return a Proc object If lines and file is specified, these are tied to the proc.
# File lib/proc_source.rb, line 24 def to_proc(kind="proc") if @file && @lines raise "#lines must be a range" unless @lines.kind_of? Range result = eval("#{kind} #{self}", binding, @file, @lines.min) else result = eval("#{kind} #{self}") end result.source = self result end
Generated with the Darkfish Rdoc Generator 2.