title: Ruby method with maximum number of parameters
body: <p>I have a method, that should accept maximum 2 arguments. Its code is like this:</p>
  
  <pre><code>def method (*args)
    if args.length &lt; 3 then
      puts args.collect
    else
      puts "Enter correct number of  arguments"
    end
  end
  </code></pre>
  
  <p>Is there more elegant way to specify it?</p>