module Blankman

Constants

VERSION

Public Class Methods

blank?(value) click to toggle source
# File lib/blankman.rb, line 24
def blank?(value)
  value = value.dup
  case value
  when String then value.extend(StringMethods)
  when NilClass then value.extend(NilMethods)
  end

  value.blank?
end
present?(value) click to toggle source
# File lib/blankman.rb, line 35
def present?(value)
  !blank?(value)
end

Private Instance Methods

blank?(value) click to toggle source
# File lib/blankman.rb, line 24
def blank?(value)
  value = value.dup
  case value
  when String then value.extend(StringMethods)
  when NilClass then value.extend(NilMethods)
  end

  value.blank?
end
present?(value) click to toggle source
# File lib/blankman.rb, line 35
def present?(value)
  !blank?(value)
end