Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Get wrapper for inverted comparisons.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 .yardopts
Octocat-spinner-32 Gemfile
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 vertere.gemspec
README.md

vertere

Build Status Gem Version

Description

Get wrapper for inverted comparisons.

Features

Wraps

  • #==
  • #===
  • #=~
  • #<=>

Usage

require 'vertere'

# An approaching to invert comparisons
num_chars = %w[0 1 9 10 11]
num_chars.grep(/0/)                  #=> ["0", "10"]
num_chars.grep(Veretere.invert(/0/)) #=> ["1", "9", "11"]

# Extend core classies
require 'vertere/core_ext'
num_chars.grep(/0/.for_!)            #=> ["1", "9", "11"]

# And more
num_chars.sort_by{|s|s.to_i.for_!}   #=> ["11", "10", "9", "1", "0"]

Requirements

Install

$ gem install vertere

Link

License

The MIT X11 License
Copyright (c) 2012 Kenichi Kamiya
See MIT-LICENSE for further details.

Something went wrong with that request. Please try again.