Sha256: ffc364b42f8b2b92bea7ab121c1a251e71f8bce00495e5f66a45aac1e2e9f99c

Contents?: true

Size: 230 Bytes

Versions: 10

Compression:

Stored size: 230 Bytes

Contents

module Kernel

  # The opposite of #nil?.
  #
  #   "hello".not_nil?     # -> true
  #   nil.not_nil?         # -> false
  #
  # CREDIT: Gavin Sinclair

  def not_nil?
    not nil?
  end

  alias_method :non_nil?, :not_nil?

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
facets-2.8.4 lib/core/facets/kernel/not_nil.rb
facets-2.8.3 lib/core/facets/kernel/not_nil.rb
facets-2.8.2 lib/core/facets/kernel/not_nil.rb
facets-2.8.1 lib/core/facets/kernel/not_nil.rb
facets-2.8.0 lib/core/facets/kernel/not_nil.rb
facets-2.7.0 lib/core/facets/kernel/not_nil.rb
facets-2.6.0 lib/core/facets/kernel/not_nil.rb
facets-2.5.1 lib/core/facets/kernel/not_nil.rb
facets-2.5.0 lib/core/facets/kernel/not_nil.rb
facets-2.5.2 lib/core/facets/kernel/not_nil.rb