There is no "top level" object or class_eval in Objective-C, so the situation is quite different from Ruby.
Here is an interesting paper about classboxes[1] (same concept as refinements), and the source code for the Objective-C runtime[2]. I found them to be useful in my research.
[1] http://rmod.lille.inria.fr/archives/papers/Berg05a-CompLangE...
[2] http://opensource.apple.com/source/objc4/objc4-532.2/runtime...
> swizzling happens only once at compile time.
Objective-C is a dynamic language in every sense of the term.
As examples, at runtime, you can:
- change an existing class' superclass - swizzle methods - create a class ex nihilo (though it'd be a better idea to inherit from NSObject) - give that class (or even an existing one) methods, ivars, and properties
.. and much more
Visit the runtime reference[1] and jump into a running Objective-C app with GDB or F-Script. It's a lot of fun.
[1] https://developer.apple.com/library/mac/#documentation/Cocoa...