UIView.animateWithDuration(0.5, animations:lambda { //do something })
in RubyMotion. Basically the same.