Here’s a useful enhancement to arrays that allows you to process elements in a block n at a time. N is inferred by the arity of your block signature. Namaste…
Monthly Archives: February 2012
Sleek CLI wrappers around Ruby libs
When using Ruby’s splat operator for method invocation, eg. my_method(*my_array), it takes the array and blows it out into the parameters required to fill the method’s signature. This makes it super easy to call methods from classes via the command line, by simply passing the arguments (ARGV) to a Ruby command line app and thenContinue reading “Sleek CLI wrappers around Ruby libs”