Sha256: c79cefeb38882597c70ae7b27455fdf8a772ceff1b88e61e409265c7ac527be3

Contents?: true

Size: 231 Bytes

Versions: 7

Compression:

Stored size: 231 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

7 entries across 7 versions & 2 rubygems

Version Path
facets-2.4.0 lib/facets/kernel/not_nil.rb
facets-2.4.1 lib/facets/kernel/not_nil.rb
facets-2.4.2 lib/core/facets/kernel/not_nil.rb
facets-2.4.3 lib/core/facets/kernel/not_nil.rb
facets-2.4.4 lib/core/facets/kernel/not_nil.rb
facets-2.4.5 lib/core/facets/kernel/not_nil.rb
mack-facets-0.8.2 lib/gems/facets-2.4.5/lib/core/facets/kernel/not_nil.rb