class Babl::Utils::Proc
Public Class Methods
constant(value)
click to toggle source
Create a lambda returning a constant.
# File lib/babl/utils/proc.rb, line 12 def constant(value) -> { value } end
selfify(proc)
click to toggle source
Wrap a proc in a lambda, so that it is executed in the context of its first (and only) argument.
# File lib/babl/utils/proc.rb, line 7 def selfify(proc) ->(this) { this.instance_exec(&proc) } end