magic_metaclass

Get Version

1.0.0

→ PersonMetaclass

What

For each Ruby class, say Person, its matching explicit metaclass is now available via a similarly named constant PersonMetaclass.

class Person; end
Person
# => Person
PersonMetaclass
# => #<Class:Person>
PersonClass
# => #<Class:Person>
PersonEigenclass
# => #<Class:Person>
PersonEigen
# => #<Class:Person>


metaclass = class << Person; self; end
PersonMetaclass == metaclass
# => true

Installing

sudo gem install magic_metaclass

Within your application, add the following line:

require 'magic_metaclass'

Forum

http://groups.google.com/group/magicmodels

How to submit patches

Read the 8 steps for fixing other people’s code and for section 8b: Submit patch to Google Groups, use the Google Group above.

License

This code is free to use under the terms of the MIT license.

Contact

Comments are welcome. Send an email to Dr Nic Williams via the forum

Dr Nic Williams, 3rd April 2008
Theme extended from Paul Battley, by Daniel Cadenas via DepGraph