Refactor, ruby uses functions.recognize