Sha256: 3c34ac338ad6e2a9ac4977aa1186a86a64804f2dd223fd8a38b934fa164bb1f1

Contents?: true

Size: 235 Bytes

Versions: 1

Compression:

Stored size: 235 Bytes

Contents

unless Object.instance_methods.include?(:blank?)
  class Object
    def blank?
      respond_to?(:empty?) ? !!empty? : !self
    end

    def presence
      blank? ? nil : self
    end

    def present?
      !blank?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vue_cli-rails-0.5.0 lib/helpers/lib/common.rb