Sha256: 13095ed81fccc4d32d92f2dec418505cbfae4fc38975796db3cb3c0905a8b573

Contents?: true

Size: 496 Bytes

Versions: 5

Compression:

Stored size: 496 Bytes

Contents

# frozen_string_literal: true

module CodeKindly
  module Utils
    module Presence
      def self.blank?(value)
        # http://apidock.com/rails/Object/blank%3F
        value.respond_to?(:empty?) ? !!value.empty? : !value
      end

      def blank?(value)
        ::CodeKindly::Utils::Presence.blank?(value)
      end

      def self.present?(value)
        !blank?(value)
      end

      def present?(value)
        ::CodeKindly::Utils::Presence.present?(value)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
codekindly-utils-0.1.0 lib/code_kindly/utils/presence.rb
codekindly-utils-0.0.14 lib/code_kindly/utils/presence.rb
codekindly-utils-0.0.13 lib/code_kindly/utils/presence.rb
codekindly-utils-0.0.12 lib/code_kindly/utils/presence.rb
codekindly-utils-0.0.11 lib/code_kindly/utils/presence.rb