Class: Utils::IRB::Shell::ConstantWrapper
- Inherits:
-
WrapperBase
- Object
- WrapperBase
- Utils::IRB::Shell::ConstantWrapper
- Defined in:
- lib/utils/irb.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
The klass reader method provides access to the class value stored in the instance.
Attributes inherited from WrapperBase
Instance Method Summary collapse
-
#initialize(obj, name) ⇒ Utils::Patterns::Pattern
constructor
The initialize method sets up a new instance with the provided object and name.
Methods inherited from WrapperBase
Constructor Details
#initialize(obj, name) ⇒ Utils::Patterns::Pattern
The initialize method sets up a new instance with the provided object and name.
This method configures the instance by storing a reference to the object’s class and creating a description string that combines the name with the class name.
371 372 373 374 375 |
# File 'lib/utils/irb.rb', line 371 def initialize(obj, name) super(name) @klass = obj.class @description = "#@name:#@klass" end |
Instance Attribute Details
#klass ⇒ Object (readonly)
The klass reader method provides access to the class value stored in the instance.
380 381 382 |
# File 'lib/utils/irb.rb', line 380 def klass @klass end |