Clean up your API using instance_eval
If you are writing an API (e.g. for a gem) then making use of Ruby’s intance_eval method can give your API a much more DSL-like syntax. Check out my quick into here: http://itshouldbeuseful.wordpress.com/2011/08/12/use-instance_eval-to-clean-up-your-api
Post a comment