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:

one can say:
You can of course put it anywhere you like, chaining any method you want.


Install it as a gem:

gem install iain-not --source

or as a Rails plugin:

./script/plugin install git://




Iain Hecker (


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

You can also clone the project with Git by running:

$ git clone git://