Implemente Ruby parser as class instead of module

Because it has state.