Sha256: 8346cab65f907187f0b7083203b763e7170f180b1371248ec11560bdb930d189

Contents?: true

Size: 266 Bytes

Versions: 10

Compression:

Stored size: 266 Bytes

Contents

module Kernel

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

  def not_nil?
    ! nil?
  end

  # DEPRECATED: #not_nil? it enough.
  #alias_method :non_nil?, :not_nil?

end

Version data entries

10 entries across 9 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 lib/core/facets/kernel/not_nil.rb
facets-3.1.0 lib/core/facets/kernel/not_nil.rb
facets-3.0.0 lib/core/facets/kernel/not_nil.rb
facets-2.9.3 lib/core/facets/kernel/not_nil.rb
facets-2.9.2 src/core/facets/kernel/not_nil.rb
facets-2.9.2 lib/core/facets/kernel/not_nil.rb
facets-2.9.1 lib/core/facets/kernel/not_nil.rb
facets-2.9.0 lib/core/facets/kernel/not_nil.rb
facets-2.9.0.pre.2 lib/core/facets/kernel/not_nil.rb
facets-2.9.0.pre.1 lib/core/facets/kernel/not_nil.rb