Module: Kernel
- Defined in:
- lib/core_ext/kernel.rb
Instance Method Summary collapse
-
#eigenclass ⇒ Class
Returns the eigenclass (singleton class) of the current object.
Instance Method Details
#eigenclass ⇒ Class
Returns the eigenclass (singleton class) of the current object. This allows classes to reference their own class-level methods and variables.
17 18 19 20 21 |
# File 'lib/core_ext/kernel.rb', line 17 def eigenclass class << self self end end |