method

eval

v1_8_7_330 - Show latest stable - Class: Binding
eval(...)
public

Evaluates the Ruby expression(s) in string, in the binding’s context. If the optional filename and lineno parameters are present, they will be used when reporting syntax errors.

def getBinding(param)
  return binding
end
b = getBinding("hello")
b.eval("param")   #=> "hello"