test-driven learning Ruby meta-programming. Forked for up-to-date ruby versions
René Maya 50ac8f43d2 Add continuous integration | vor 5 Jahren | |
---|---|---|
knowledge | vor 5 Jahren | |
.continuous_integration.yml | vor 5 Jahren | |
README.markdown | vor 5 Jahren | |
meta_guru.rb | vor 15 Jahren | |
meta_koans.rb | vor 5 Jahren | |
meta_student.rb | vor 5 Jahren |
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!