Implementing a simple object system from scratch in Ruby