class Utils::IRB::Shell::ConstantWrapper

and comparison operations based on constant descriptions.
providing structured access to constant metadata and enabling sorting
interactive exploration of Ruby constants in environments like IRB by
including their names and associated classes. It facilitates
constant objects, offering detailed information about constants
This class extends WrapperBase to create specialized wrappers for Ruby
introspection and display capabilities.
A wrapper class for Ruby constant objects that provides enhanced

def initialize(obj, name)

Returns:
  • (Utils::Patterns::Pattern) - a new pattern instance configured with the provided arguments

Parameters:
  • name (String) -- the name to be used in the description
  • obj (Object) -- the object whose class will be referenced
def initialize(obj, name)
  super(name)
  @klass = obj.class
  @description = "#@name:#@klass"
end