Ad
  • Default User Avatar

    In the description, consider calling it an array instead of a list. And consider changing it a little bit so that they can't just call index on the block. I don't know, I feel like it can be just a tiny bit more challenging without being too hard.

  • Default User Avatar

    I agree with cmpolis. If the purpose of this is to learn monkey patching, then alter it slightly so they cannot just use alias.

    Maybe rephrase: "Learn to use Ruby's feature to re-open class to add new functionalities to existing classes and objects."

    to:

    "Ruby lets you re-open classes so you can add new functionality to existing classes and objects."

  • Default User Avatar

    It's a good kata. I had to read the description several times before I got it.

    Maybe "you must be able to subscribe n number of blocks to the same key" could be "you must be able to subscribe multiple blocks to the same key"

  • Default User Avatar

    Think about it this way... if you look at the diagrams in the kata, it is a spiral. Everytime it goes from left to right, it is on the top most row that hasn't been processed, every time it goes from up to down, it's on the right-most column that hasn't been processed, when it's right to left, it's always the very bottom and when it's down to up it's always the left-most column. So if you think about it as 4 different phases that you have to do over and over again, making sure not to process any element twice, then maybe it's more manageable. That's how I thought of the solution when I finally figured it out. There are other more graceful solutions though, and many other ways of solving it of course.

  • Default User Avatar

    it also doesn't support "http://subdomain.domain.com". my solution doesn't either, but I was trying to write the minimal amount to pass the tests ;) because lazy