Sometimes relationships need to be flexible, and that's where we look to polymorphism. Say we want to implement:
- A
Person
- A
Company
- A
PhoneNumber
that can connect to aPerson
or aCompany
## based on the example at: | |
## http://gist.github.com/17371 | |
## | |
## put me in lib/un_haml.rb (in the haml-based project) | |
## | |
## call me on the command line thus: | |
## $ script/runner UnHaml app/views/layouts/application.html.haml | |
## $ script/runner UnHaml */*/*/*.haml | |
## | |
class UnHaml < Haml::Engine |