Skip to content

iain/not

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages