This is a simple option class I wrote in Ruby after reading some C++ code.