title: What is Replace Conditional with Polymorphism Refactoring? How is it implemented in Ruby?
body: <p>I recently came across the <strong>Replace Conditional with Polymorphism Refactoring</strong> while asking for elimination of <code>if..else</code> conditional in ruby.<a href="https://stackoverflow.com/questions/30918158/possible-help-in-code-refactoring?noredirect=1#comment49878850_30918158">the link</a></p>
  
  <p>Can anybody explain to me how can i implement the same in ruby?(A simple sweet code would do)</p>