class Object

Add some methods concerning present and PresentClass to all objects by extending Object.

Constants

PRESENT

Initializes a new constant with a frozen instance of PresentClass.

Public Instance Methods

present() click to toggle source

present returns PRESENT constant.

# File lib/tektite_ruby_utils/present.rb, line 140
def present
  PRESENT
end
present?() click to toggle source

Allow .present? method on all objects

# File lib/tektite_ruby_utils/present.rb, line 58
def present?
  !nil?
end
present_with_class()

Aliases :present_with_class to :present_with_type

Alias for: present_with_type
present_with_type() click to toggle source

Return a new PresentClass object with @type defined as the type of the object.

# File lib/tektite_ruby_utils/present.rb, line 64
def present_with_type
  PresentClass.new(self.class)
end
Also aliased as: present_with_class