title: How do I create a function .find_by_label(x), which is equivalent to .find_by(label: x)?
body: <p>My code has two functions which are essentially the same, except the parameters name. It would be great to merge two functions and make it generic. For example: </p>
  
  <pre><code>def self.find_global_variable_by_id(id) ## RSpec - Ok
      if result_global_unscoped = Variable.global.find_by(id: id)
          return result_global_unscoped
      end
      if result_global_scoped_workspace = Variable.find_by(id: id)
          return result_global_scoped_workspace
      end 
  end
  def self.find_global_variable_by_label(label) ## RSpec - Ok
      if result_global_unscoped = Variable.global.find_by(label: label)
          return result_global_unscoped
      end
      if result_global_scoped_workspace = Variable.find_by(label: label)
          return result_global_scoped_workspace
      end 
  end 
  </code></pre>
  
  <p>And I would like to have something like this:</p>
  
  <pre><code>def self.find_global_variable_by_&lt;id/label&gt;(x)
      if result_global_unscoped = Variable.global.find_by_&lt;id/label&gt;(x)
          return result_global_unscoped
      end
      if result_global_scoped_workspace = Variable.find_by_&lt;id/label&gt;(x)
          return result_global_scoped_workspace
      end 
  end
  </code></pre>
  
  <p>Is it possible?</p>