Temporary execution context with included modules


Category:
Scripts
Ruby
Requirements:
Seller:
Price:
-
System:
Rating:
4.7
License:

Description - Temporary execution context with included modules



I needed to extend "self" with a module but only wanted the included methods to stick around "temporarily". After a lot of futile attempts with binding, callcc, EVAL, etc... I found it was as simple as "self.dup.instance_eval { ... } ".



More in Ruby-Temporary execution context with included modules

Execution Context Included Modules