Port of activemodel to RubyMotion.