Skip to content

How to execute the code in a Pharo snippet programmatically? #2686

Answered by offray
offray asked this question in Q&A
Discussion options

You must be logged in to vote

I'm putting here a modified and tested answer from an idea given by @hellerve and @botwhytho in the Discord channel. The key was to look at the "Programmatic code evaluation" of the Gt Book:

coder := GtPharoSnippetCoder forSource: self contentAsString.
(coder doItAll) value asString

Thanks,

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by offray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant