title: Create multiple identical methods in Ruby
body: <p>In one of my models I have code like this:</p>
  
  <pre><code>def lendable_category=(i)
    set_category(i)
  end
  
  def free_category=(i)
    set_category(i)
  end
  
  def skill_category=(i)
    set_category(i)
  end
  </code></pre>
  
  <p>The methods are virtual parameters which I've added so I can save an object using a params hash without coercing the hash in my controller.</p>
  
  <p>It doesn't feel great to say the same thing three times. Is there a better way to create identical methods like this?</p>