only_blank Build Status Gem Version

only_blank

A tiny library for bring the ruby on rails awesome blank? method and friends to ruby.

Getting Started

Add to your Gemfile

gem 'only_blank'

Then, you get three method `blank?`, `present?`, `presence` defined on following class.

FalseClass, Object, NilClass, Numeric, String, TrueClass.

Credits

Basically, this gem just a tiny wrapper around two library.

  1. The sequel blank extension which implement the same blank? logic as Ruby On Rails.

  2. fast_blank gem, which is a simple C extension which provides a very fast implementation of String#blank? method.