Fork me on GitHub

not by iain

Syntactic sugar for negating any results: @foo.not.nil?

Rubyists love human readable code. But sometimes we need to revert to the exclamation mark to negate a certain command. This small gem adds a little syntactic sugar. Instead of doing:

!@user.nil?
one can say:
@user.not.nil?
You can of course put it anywhere you like, chaining any method you want.

Install

Install it as a gem:

gem install iain-not --source http://gems.github.com

or as a Rails plugin:

./script/plugin install git://github.com/iain/not.git

License

MIT

Author

Iain Hecker (iain.nl)

Download

You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/iain/not