Sha256: 405c2393acb67783ccb1b59ba19cb4accccd3375f0a7b8f4a891931ae459f32a

Contents?: true

Size: 645 Bytes

Versions: 1

Compression:

Stored size: 645 Bytes

Contents

class Object
  # Self test Boolean class.
  #
  # @return   boolean
  def boolean?
    self.is_a?(TrueClass) || self.is_a?(FalseClass)
  end

  # Self test Trueclass.
  #
  # @return   boolean
  def true?
    self.is_a?(TrueClass)
  end
  # Self test Falseclass.
  #
  # @return   boolean
  def false?
    self.is_a?(FalseClass)
  end

  # Self test Symbol class.
  #
  # @return   boolean
  def symbol?
    self.is_a?(Symbol)
  end
  # Self test String class.
  #
  # @return   boolean
  def string?
    self.is_a?(String)
  end

  # Self test nil Object class.
  #
  # @return   boolean
  # def nil?
  #   return '' if self == nil
  # end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tools-0.4.5 lib/lib/object.rb