Code for motioncast on weak references in RubyMotion 2.0