Created
June 22, 2024 22:46
-
-
Save skatkov/642fe6f2abd7b756e2ca146dad4efe33 to your computer and use it in GitHub Desktop.
Detect when class was loaded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loader.on_load("MyDynamicClass") do |klass, _abspath| | |
puts "MyDynamicClass was loaded and now we can do stuff with it" | |
klass.prepend(MyFix) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment