开发者

Evaluating Ruby code within the context of another Ruby script

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜