Methods

Class/Module Index [+]

Quicksearch

Ramaze::CoreExtensions::Proc

Extensions for Proc

Public Instance Methods

locals() click to toggle source

Returns a hash of localvar/localvar-values from proc, useful for template engines that do not accept bindings/proc and force passing locals via hash

Usage:

x = 42; p Proc.new.locals #=> {'x'=> 42}
# File lib/ramaze/snippets/proc/locals.rb, line 14
def locals
  instance_eval('binding').locals
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.