Path: | lib/more/facets/reflection.rb |
Last Update: | Tue Dec 02 09:46:42 -0500 2008 |
Provides externailzed, safe access to an object‘s meta-information.
Copyright (c) 2006 Thomas Sawyer
Ruby License
This module is free software. You may use, modify, and/or redistribute this software under the same terms as Ruby.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This is expirmental. Maybe it should be moved to the Trinkets project. The idea is to be able to access a object as a pure object, by binding methods called to Object/Kernel first. Thus bypassing any overriden methods.
But you can use at to do this already.
obj.at(Object).object_id
For metaprogramming this can be important.