class EvalString < String def eval(b) b.eval String.new(self) endend
>> foo = 1=> 1>> bar = 2=> 2>> str = EvalString.new "foo+bar"=> "foo+bar">> str=> "foo+bar">> str.eval(binding)=> 3
Post a Comment
No comments:
Post a Comment