Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8417 (closed enhancement: untested)

Opened 3 years ago

Last modified 3 years ago

Function#not

Reported by: sylvainzimmer Assigned to: sam
Priority: low Milestone:
Component: Prototype Version: edge
Severity: normal Keywords:
Cc:

Description

A simple method that may be handy:

  not: function() {
  	return this.wrap(function(a) {return !a});
  }

Change History

05/21/07 12:35:36 changed by sylvainzimmer

Sorry for the typo:

  not: function() {
  	return this.wrap(function(a) {return !a()});
  }

05/27/07 00:44:46 changed by eventualbuddha

  • status changed from new to closed.
  • resolution set to untested.

What is this for? Do you have an example of its use? How about some tests? Reopen when you provide that info. Have a look in #rails-contrib on irc.freenode.net if you have questions.