^ ^ ^
....... ...
«~ INSTANT DSL ~»
''''''' '''
Installation:
$ gem install instant_dsl
Usage:
require ‘instant_dsl’
PageDSL = InstantDSL[:title, :items]
@name = ‘Janosch’
page = PageDSL.new(self) # the (optional) parameter is the scope from which # instance variables are copied
page.instance_eval do
title 'hey ' + @name
items 'box', 'bib'
items 'bob'
end
page.items ‘blab’
page.dsl_values # => => [‘hey Janosch’], :items => [‘box’, ‘bib’, ‘bob’, ‘blab’]