I saw a method defined and used like this:
def mention(status, *names)
...
end
mention('Your courses rocked!', 'eallam', 'greggpollack', 'jasonvanlue')
Why not just use an array as the second argument instead of combining the arguments into an array using splat?
def mention(status, names)
...
end
mention('Your courses rocked!', ['eallam', 'greggpollack', 'jasonvanlue'])
This would also allow more arguments at the end.
def mention(status, names, third_argument, fourth_argument)
...
end
mention('Your courses rocked!', ['eallam', 'greggpollack', 'jasonvanlue'], Time.now, current_user)