Sha256: 0dec7a44e134569404f366305d7547bf444363af9d7ce815ece67e16f746fdc6

Contents?: true

Size: 315 Bytes

Versions: 11

Compression:

Stored size: 315 Bytes

Contents

# frozen_string_literal: true

module CoreExtensions
  module Object
    # Object extension to include .present? and .not_present? method
    module PresenceCheck
      def present?
        !not_present?
      end

      def not_present?
        to_s.empty?
      end

      ::Object.include self
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
elasticsearch-query-builder-0.6.7 lib/core_extensions/core_extensions.rb
elasticsearch-query-builder-0.6.6 lib/core_extensions/core_extensions.rb
elasticsearch-query-builder-0.6.5 lib/core_extensions/core_extensions.rb
elasticsearch-query-builder-0.6.4 lib/core_extensions/core_extensions.rb
elasticsearch-query-builder-0.6.3 lib/core_extensions/core_extensions.rb
elasticsearch-query-builder-0.6.2 lib/core_extensions/core_extensions.rb
elasticsearch-query-builder-0.6.1 lib/core_extensions/core_extensions.rb
elasticsearch-query-builder-0.6 lib/core_extensions/core_extensions.rb
elasticsearch-query-builder-0.5 lib/core_extensions/core_extensions.rb
elasticsearch-query-builder-0.1.7 lib/core_extensions/core_extensions.rb
elasticsearch-query-builder-0.1.6 lib/core_extensions/core_extensions.rb