M
MohsinHijazee
Hello!
Consider this case:
myHash = {:a_line_of_code => "pre_count = Posts.count",
:another_line => %q~message =
get_formatted_message(#{pre_count})~}
If I have a hash like this which contains code snippets as strings,
How can I execute them? Moreover consider also that the second code
snippet uses the value of the variable assigned in the first one.
Regards,
Mohsin
Consider this case:
myHash = {:a_line_of_code => "pre_count = Posts.count",
:another_line => %q~message =
get_formatted_message(#{pre_count})~}
If I have a hash like this which contains code snippets as strings,
How can I execute them? Moreover consider also that the second code
snippet uses the value of the variable assigned in the first one.
Regards,
Mohsin