Optical systems in Ruby