Sha256: 0155b2db9da9b9a6e0bf887a1a7ead9edbcfcc72891efdc840fd68617f724f1d

Contents?: true

Size: 186 Bytes

Versions: 2

Compression:

Stored size: 186 Bytes

Contents

# encoding: utf-8
class Object
  def blank?
    respond_to?(:empty?) ? !!empty? : !self
  end

  def present?
    !blank?
  end
end

class String
  def blank?
    strip.empty?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
inactive_support-1.3.0 lib/inactive_support/object/blank.rb
inactive_support-1.2.0 lib/inactive_support/object/blank.rb