Let's learn some ruby meta programming that will be useful as a developer!
Files that will be pertinent are:
- constants.rb - How to use #const_get for fancy things like policies or strategies.
- variables.rb - How to peak into objects and grab and set variables
- method_missing.rb - How to use #method_missing to really spruce up the magic
Here are some browser-based repl's you can use:
- http://repl.it/languages/Ruby
- http://labs.codecademy.com/
- http://joel.franusic.com/Online-REPs-and-REPLs/
Some more sites you might like to check out.
- http://ruby-metaprogramming.rubylearning.com/
- http://www.trottercashion.com/2011/02/08/rubys-define_method-method_missing-and-instance_eval.html
- http://rubymonk.com/learning/books/2-metaprogramming-ruby/chapters/32-introduction-to-metaprogramming/lessons/75-being-meta
- http://www.amazon.com/Metaprogramming-Ruby-Program-Like-Pros/dp/1934356476
- https://pragprog.com/book/ppmetr2/metaprogramming-ruby-2