Hi, I’m new to ruby, and I’m loving it so far.
I want to call a method with some parameters that would indicate a
state, so most of them would be only a true or false value, however
that’s not very good to read when calling the method. Like this:
def dosomework(directory, overwrite = false, use_id_as_filename =
dosomework(’/’, true, false)
I would like to call that function with some readable parameters,
something like this:
dosomework(’/’, Overwrite, UseIdAsFilename)
I have tried array arguments and hashes, but I didn’t like those
solutions. What would be the recommended way to do that in Ruby?