The original gist has been removed. If you still want tho code, do not worry, as I have simply moved it into my regular github repository. The link will follow. https://github.com/RavensKrag/eternity/blob/master/Utilities/InputHandler.rb
Chad Godsey uploaded a class called InputHandler a while back, but the Ruby version was a bit unruly for my tastes. Thus, I have rewritten it, using more object-oriented programming instead of the nested hashes found in the original code. I think my version is much easier to understand and extend, but that could just be me.
I'm currently working on an additional input type called Combo, which will detect button presses that are a certain amount of time apart. This spacing can even be different between button presses. I'll try to remember to post that up as well once that's done.
Thanks again to Chad Godsey for the original code.
FOR LINK SEE ABOVE