One liner in Ruby for displaying a prompt, getting input, and assigning to a variable?

I think going with something like what Marc-Andre suggested is going to be the way to go, but why bring in a whole ton of code when you can just define a two line function at the top of whatever script you’re going to use:

def prompt(*args)
    print(*args)
    gets
end

name = prompt "Input name: "

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)