test-driven learning Ruby meta-programming. Forked for up-to-date ruby versions
René Maya 50ac8f43d2 Add continuous integration | 5 роки тому | |
---|---|---|
knowledge | 5 роки тому | |
.continuous_integration.yml | 5 роки тому | |
README.markdown | 5 роки тому | |
meta_guru.rb | 15 роки тому | |
meta_koans.rb | 5 роки тому | |
meta_student.rb | 5 роки тому |
I've been asked a few times by clients to give Ruby meta-programming training to other developers. The first time that this happened, I was lucky to stumble upon RubyQuiz #67 - metakoans.rb.
After using MetaKoans as a training tool for the first time, I realized that, while it was great for helping people to learn Ruby meta-programming, it didn't lend itself as easily as it could to being solved in an incremental fashion. For details on this, see my blog article on the topic.
I've rewritten the koans so that the solution can be developed more incrementally. To train from the beginning simply:
$ ruby meta_koans.rb
I've also saved the knowledge permutations that I made for each koan, to
prove that the problem can be solved in a stepwise fashion included under
the knowledge
directory.
To replay a specific permutation:
$ ruby meta_koans.rb [koan_num] [revision]
that is
$ ruby meta_koans.rb 1 4
If you're looking to learn Ruby meta-programming, don't look at my knowledge files!