An exercise in implementing ActiveRecord-esce features in Ruby