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 free.
FalseClass
, Object
, NilClass
, Numeric
, String
, TrueClass
.
Credits
Basically, this gem just a tiny wrapper around two library.
-
The sequel blank extension which implement the same blank? logic as Ruby On Rails.
-
fast_blank gem, which is a simple C extension which provides a very fast implementation of
String#blank?
method.