title: How to ignore extra arguments in ruby
body: <p>I'm writing a script that passes in several arguments to a set of pg queries. Some of these queries take 2 date arguments, and some only take 1. I'm wondering if there's a way for the query to ignore any 'extra' date arguments that are passed to it.</p>
  
  <p>E.g. this command runs for every query in DailyQueries:</p>
  
  <pre><code>DailyQueries.send(query_name, conn, date_1, date_2)
  </code></pre>
  
  <p>I have some queries that are structured as such:</p>
  
  <pre><code>DailyQueries.tot_students(conn, date)
  </code></pre>
  
  <p>While others as:</p>
  
  <pre><code>DailyQueries.fact_practice_tot_sessions(conn, start_date, end_date)
  </code></pre>
  
  <p>And would ideally the former to run even if it's getting 2 date arguments passed in. Right now I'm getting this error:</p>
  
  <pre><code>wrong number of arguments (3 for 2) (ArgumentError)
  </code></pre>