Essentially I\'m wondering if the following can be done in Ruby.
So for example:
def bar(symbol) # magic code goes here, it outputs \"a = 100\"
You have to pass foo's context to bar:
foo
bar
def foo a = 100 bar(:a, binding) end def bar(sym, b) puts "#{sym} is #{eval(sym.to_s, b)}" end