Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
That code is very well documented, but it requires at least basic Ruby knowledge to understand completely. This isn't something anyone can just explain to you in a post, I suggest you put the work in to read documentation and watch videos.