RAA - merlin-let

merlin-let / 0.0.1

Short description: Lisp/Scheme-like let mixin for IO, Hash and ENV.
Category: Library/Syntax
Status: stable
Created: 2004-02-14 04:37:56 GMT
Last update: -
Owner: merlin (Projects of this owner)
Homepage: http://merlin.org/ruby/#merlin-let
Download: http://merlin.org/ruby/#merlin-let
License: LGPL
Dependency:
None
Description:

Lisp/Scheme-like let mixin for IO, Hash and ENV.

io.let(io) { |io| block } - Reopens the IO object with the parameter, executes the block and then restores the IO object.
require 'merlin/let'
STDERR.let(STDOUT) { |stderr| STDERR.puts "to STDOUT" }

hash|ENV.let(array) { |array| block } - Reassigns the specified entries in the Hash to the specified values, executes the block and then restores the Hash.
require 'merlin/let'
ENV.let(['PATH', '/bin']) { |orig| system "echo" }

Edit this project (for project owner)

back to RAA top