Sha256: f54d6b1481c56f3e889b0e941e7d27a257f450a5eb2391f9631aa63b0e0239f9

Contents?: true

Size: 406 Bytes

Versions: 4

Compression:

Stored size: 406 Bytes

Contents

class NilClass #:nodoc:
  def blank?
    true
  end
  alias_method :empty?, :blank?
end

class FalseClass #:nodoc:
  def blank?
    true
  end
end

class TrueClass #:nodoc:
  def blank?
    false
  end
end

class Array #:nodoc:
  alias_method :blank?, :empty?
end

class Hash #:nodoc:
  alias_method :blank?, :empty?
end

class String
  def blank?
    self !~ /\S/
  end unless "".respond_to? :blank
end


Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sugar-high-0.7.3 lib/sugar-high/blank.rb
sugar-high-0.7.2 lib/sugar-high/blank.rb
sugar-high-0.7.1 lib/sugar-high/blank.rb
sugar-high-0.7.0 lib/sugar-high/blank.rb