Skip to content

Instantly share code, notes, and snippets.

@skatkov
Created June 22, 2024 22:46
Show Gist options
  • Save skatkov/642fe6f2abd7b756e2ca146dad4efe33 to your computer and use it in GitHub Desktop.
Save skatkov/642fe6f2abd7b756e2ca146dad4efe33 to your computer and use it in GitHub Desktop.
Detect when class was loaded
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