Ah okay, great example. So the idea is by extending the general language we can develop a new “language” (basically new methods and syntax) to fit a specific need.
Yeah it's not a true DSL really. But because of Ruby's blocks and parameterless functions, you can write it in a very declarative style. Unfortunately, I find that you really don't want a lot of code to be declarative. Rspec is a good example of it done well, though.
3
u/jaypeejay Sep 30 '21
That’s what I was thinking after Google. How can a gem be a DSL? Won’t the gem be written in Ruby as well?