我想按特定顺序对数组执行多项操作。每个行为单元都有自己的方法,我有这样的东西:
def build_array_of_cool_employees
employees = fetch_all_employees
employees = remove_strange_employees_from employees
employees = add_ideal_employee_to employees
employees = sort_by_awesomeness employees
end
我想知道是否有更好的方法。我觉得我缺少一些可以使我的代码更好的功能。我是吗?