Module: Tins::Eigenclass

Included in:
Object, ClassMethod
Defined in:
lib/tins/dslkit.rb

Overview

This module contains some handy methods to deal with eigenclasses. Those are also known as virtual classes, singleton classes, metaclasses, plus all the other names Matz doesn’t like enough to actually accept one of the names.

The module can be included into other modules/classes to make the methods available.

Instance Method Summary collapse

Instance Method Details

#eigenclass_eval(&block) ⇒ Object

Evaluates the block in context of the eigenclass of this object.



20
21
22
# File 'lib/tins/dslkit.rb', line 20

def eigenclass_eval(&block)
  eigenclass.instance_eval(&block)
end