Sha256: 999364e91a0b5c83e604a5f3ce8c8c506a48e64228af28ba71a12e6d4f2537e2

Contents?: true

Size: 432 Bytes

Versions: 13

Compression:

Stored size: 432 Bytes

Contents

module Kernel

  # Returns true is an object is class TrueClass,
  # otherwise false.
  #
  #   true.true?   #=> true
  #   false.true?  #=> false
  #   nil.true?    #=> false
  #
  def true?
    (true == self)
  end

  # Returns true is an object is class FalseClass,
  # otherwise false.
  #
  #   true.false?   #=> false
  #   false.false?  #=> true
  #   nil.false?    #=> false
  #
  def false?
    (false == self)
  end

end

Version data entries

13 entries across 12 versions & 2 rubygems

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