title: Ruby: implementing an extra condition in an elegant way
body: <p>I'm automating some tests in Appium using ruby.
  I'm writing code that looks somewhat like this</p>
  
  <pre><code>...
  element_list #array filled with elements from a UI
  element_list.each { |element| element.click if #certain condition is met 
  }
  ...
  </code></pre>
  
  <p>I search the array <code>element_list</code> for an element and <strong>click</strong> it if a certain condition is met. 
  Now lets say that the element is found, but I actually need to <strong>scroll</strong> down in order to <strong>click</strong> it.</p>
  
  <p>I can't think of an elegant way of implementing that extra condition here.</p>
  
  <p>Any ideas?</p>