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 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
MIT
Iain Hecker (iain.nl)
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