change code objc to ruby