Thanks for the heads up! Fixed the lambda syntax. I like the DSL approach too. The only inconvenience is that editors usually won't autocomplete the options for you, but with proper docs that's easy to overcome.
I actually wrote a bit on writing DSLs with instance_eval :)
Thanks for the heads up! Fixed the lambda syntax. I like the DSL approach too. The only inconvenience is that editors usually won't autocomplete the options for you, but with proper docs that's easy to overcome.
I actually wrote a bit on writing DSLs with
instance_eval
:)Write a simple DSL in Ruby
Vinicius Stock ・ Sep 24 '19 ・ 4 min read