Class: Weak::UndefinedClass

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/weak.rb

Overview

A class for the UNDEFINED object. Being a singleton, there will only be exactly one object of this class: the UNDEFINED object.

Instance Method Summary collapse

Constructor Details

#initializeUndefinedClass

Returns a new instance of UndefinedClass.

[View source]

29
30
31
# File 'lib/weak.rb', line 29

def initialize
  freeze
end

Instance Method Details

#to_sString Also known as: inspect

Returns the string ‘“UNDEFINED”`.

Returns:

  • (String)

    the string ‘“UNDEFINED”`

[View source]

34
35
36
# File 'lib/weak.rb', line 34

def to_s
  "UNDEFINED"
end