Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGELOG.rdoc
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 init.rb
Octocat-spinner-32 not.gemspec
README.rdoc

Not

This little gem/plugin adds a little syntactic sugar to your code. You can append not in the middle of your code to improve readability.

Examples

@foo.not.nil?
@user.not.active?
"something".not.tainted?
User.not.new(:name => 'iain') # not sure why you'd want to do this though
@foo.not.not.not.not.send(:not).not.nil? # sorry, couldn't resist

Installation

To install as a gem:

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

To install as a Rails plugin:

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

Copyright © 2008 Iain Hecker, released under the MIT license

Something went wrong with that request. Please try again.