josankapo/tempo-cli — pull request #1 by JangoSteve (2014-06-10 21:09:10+00:00)
Title: Method missing

Hey Jonathan, great library, looks nice!

While I was looking through it, I made the method_missing implementation a bit more robust by making the models respond to dynamic methods being captured. Also figured I'd make it just try to capture the dynamic find_by and sort_by methods that match attributes from the collection.

I'm not sure if any of these are useful, as I of course lack the context of actually using the gem for a meaningful amount of time, so feel free to close. Just thought I'd share :smile:

It'd also help performance a bit to add a `define_method` call inside `method_missing`, so that after the first call of a dynamic method, it doesn't have to re-check existence, etc on subsequent calls.

More info about the changes here:
http://www.alfajango.com/blog/method_missing-a-rubyists-beautiful-mistress/