Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  How to write your own DSL in Ruby

DSL(Domain Specific Language) is a language defined to fulfill some domain specific requirements to ease people's work. It can be used to define attributes and actions of a domain easily and cleanly. And it is often created based on some common observations or micro patterns of some domain.In Ruby world, there are quite a few places people can find DSL. For example, Ruby itself, Chef recipes.To create a class in Ruby, the traditional OOP way would look like.class User @name = nil @email = nil def name @name end def name=(val) @name = val end def email @email end def email=(va...

7,485 0       TUTORIAL RUBY DSL