More Ruby Metaprogramming
Following is a follow-up to this foul-titled file</alliteration>. It began life as a mere edit, but I soon realized that it may be either a) worthy of its own post, or b) a good way to make this blog appear apparently more active than it in fact is. Besides changing themes, that is.
All joking aside, for those of you not interesting in going back and reading that post, I think the following can stand on its own.</ado>
This no longer seems weird to me. Maybe I’be gotten used to the idea, or maybe I’ve achieved a better understanding of why this is true. Internalized it, perhaps.
If I may take a stab at expressing it in words… And it’s my blog so I guess so:
All objects are instances of the Object class. Everything that has a name in ruby is an object.
Class.instance_of? Object # => true
Object.instance_of? Class #=> true
And furthermore:
Class.instance_of? Class # => true
What a lovely triangle we’ve discovered.
[edit] Make that a square:
Object.instance_of? Object # => true
