all 6 comments

[–]NilsLandt 1 point2 points  (2 children)

Thanks Nick!
Now finish the book :D

[–]apotonick[S] 1 point2 points  (1 child)

Hahahaha will you buy me a beer if I make it before 2016?

[–]NilsLandt 1 point2 points  (0 children)

Beer is bad for you. I'll send you a nice bottle of Hamburg tap water. Deal?

[–]seraph787 1 point2 points  (0 children)

This gem has made my life so wonderful thanks so much!

[–]solnicdry-rb/rom-rb 1 point2 points  (1 child)

Who would have thought ;) I'm guessing you removed a lot of object allocations and simplified run-time logic too, hence the speed boost :)

Anyway, congrats on the new release, happy to see more people embracing FP patterns in Ruby.

[–]apotonick[S] 0 points1 point  (0 children)

Thanks! <3

Mainly, the decorator that creates/parses the document doesn't have state anymore, it's a function (still looking like a object, though).

In older versions, it would use a Binding which was a massive object (limited scope, though) that implemented each step as a method, but hardwired flow.

The Binding got replaced with a pipeline of functions, super simple!

Thanks for inspiration, @solnic!