How do method arguments work in Ruby?
<p>I can't seem to find an answer to this question, and the two books I've checked seem to be written for experienced programmers who are new to Ruby, not beginners to programming <em>as well as</em> Ruby.  I'm struggling to understand how method arguments work and what their purpose is. For example, this I can understand:</p>

<pre><code>def method_name
  # method behaviour
end
</code></pre>

<p>Then, whenever I want to re-use that particular batch of code, I simply re-enter method_name and Ruby will repeat the actions as specified in that method. However, most methods I've seen include arguments in parenthesis immediately following the name, i.e. </p>

<pre><code>def method_name (argument1, argument2)
  # method behaviour
end
</code></pre>

<p>I'm struggling to grasp what the arguments mean and how they factor into the functionality of the code. Also, why are arguments required for some methods but not others? Do arguments represent input from the user? Are they similar to params?</p>