I have a method, that should accept maximum 2 arguments. Its code is like this:
def method (*args)
if args.length < 3 then
puts args.collect
else
puts "Enter correct number of arguments"
end
end
Is there more elegant way to specify it?