I have developed a simple DSL for tasks on a UniVerse database in jruby. It looks something like this
I have a class to which I add attribute accessors dynamically at runtime. This class forms part a DSL, whereby blocks get passed to configuration methods and invoked using instance_eval. This makes it
I have the following: class Test @@a = 10 def show_a() puts \"a: #{@@a}\" end class << self @@b = \'40\'
I\'m working my way through Pickaxe 1.9, and I\'m a bit confused by constant-lookup in instance/class_eval blocks. I\'m using 1.9.2.
This is what I\'m trying to do: def call_block(in_class = \"String\", &block) instance = eval(\"#{in_class}.new\")