by cpb · 5y ago · 0 comments
Your second definition reads that `with_longer_parameters` is a keyword argument with no default.
Still, you've illustrated the keystroke savings with your choice of parameter names :-)
def login(username: ENV["USER"], password:)
p(username:, password:)
end
login(password: "xxx") #=> {:username=>"shugo", :password=>"xxx"}