This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Matthew (author)
Sat Aug 22 06:12:48 -0700 2009
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
CHANGELOG | ||
| |
MIT-LICENSE | ||
| |
README | ||
| |
Rakefile | ||
| |
init.rb | ||
| |
lib/ | ||
| |
pass_nils_to.gemspec | ||
| |
test/ |
README
= pass_nils_to Pass nils to your methods and see if they explode. == Installation Install the gem directly: gem sources -a http://gems.github.com (you only have to do this once) sudo gem install pelargir-pass_nils_to Or install the gem in your Rails project: gem sources -a http://gems.github.com script/plugin install pelargir-pass_nils_to Or clone the project: git clone git://github.com/pelargir/pass_nils_to.git == Usage Pass nils to your methods thusly: class Parser def parse(arg1, arg2) ... end end parser = Parser.new pass_nils_to(:parse, parser) This would pass nils to the #parse method in these combinations: parse(nil, "foo") parse("foo", nil) parse(nil, nil) An arbitrary number of arguments are supported, so you can try passing nils to methods with three arguments, four, five, etc. == Running Unit Tests Use the rake command to run the unit tests for the plugin. The tests require that the Mocha gem be installed locally: sudo gem install mocha == Resources Repository: http://github.com/pelargir/pass_nils_to/ Blog: http://matthewbass.com Author: Matthew Bass








