开发者

Evaluating Ruby code within the context of another Ruby script

开发者 https://www.devze.com 2023-02-28 17:31 出处:网络
My qustion is a lot easier to explain if you take a look at this Github project. Basically file1 tells file2 the current line number, then file2 reads the next couple of lines. Now I want to eval the

My qustion is a lot easier to explain if you take a look at this Github project.

Basically file1 tells file2 the current line number, then file2 reads the next couple of lines. Now I want to eval the code gathered in file2 within the context of file1.

Any ideas? I d开发者_Python百科on't expect anyone to code for me, but a nudge in the right direction would certainly help me out!


Before the eval you need to get the binding of the context.

0

精彩评论

暂无评论...
验证码 换一张
取 消