News for hackers. Stuff that matters.
Re:Ruby DSL Handbook by saturnflyer on Friday February 06, 2015 @01:26PM (#9010605)
Ah. I see. That Ruby doesn't afford this can be somewhat annoying. A counter example is using "alias". It can accept bare words, symbols, or strings. If you really wanted to get around this you could use method_missing on the class but that can open a can of worms.
Re:Ruby DSL Handbook by davexunit on Friday February 06, 2015 @02:21PM (#9010974)
'alias' is special syntax in Ruby. This emphasizes my point: You, as the user of Ruby, do not have the power that the language designers have. You cannot create new syntax rules. I argue that this power is a necessary component for creating true EDSLs, but in practice the term is used much more loosely.