This module contains things that are needed at runtime.
Prohibit these module/class+method from being overriden.
This set keeps track of modules/classes that will be monitored.
DEPRECATED : Use breakable
method instead.
This context is used for keeping track of context in the user code. This will ignore the context within the RubyBreaker code, so it is easy to pinpoint program locations without distraction from the RubyBreaker code.
The default type system for RubyBreaker
TODO:For now, we use a global switch; but in future, a switch per object should be used for multi-process apps. However, there is still a concern for module tracking in which case, there isn’t really a way to do this unless we track with the process or some unique id for that process.
This hash maps a (breakable) module to a type monitor
This constant holds the string used internally by RubyBreaker to indicate overridden methods.
This hash maps a module to a nested hash that maps a method name to a method type. This hash is shared between breakable modules/classes and non-breakable modules/classes.
Allow certain methods of these classes/modules to be overrriden. That is, they will take unwrapped arguments whatsoever.
This constant is used to determine if an object is a wrapped object.
This method instruments the specified modules/classes at the time of the call so they are monitored for type documentation.
# File lib/rubybreaker/runtime.rb, line 54 def self.break(*mods) self.install(:break, *mods) end
This method modifies specified modules/classes at the very moment (instead of registering them for later). DEPRECATED: Use +break()+ method instead
# File lib/rubybreaker/runtime.rb, line 76 def self.breakable(*mods) self.install(:break, *mods) end
This method instruments the specified modules/classes at the time of the call so that they are type checked during runtime.
# File lib/rubybreaker/runtime.rb, line 60 def self.check(*mods) self.install(:check, *mods) end
This method installs a monitor for each breakable module. DEPRECATED: Use +breakable()+ method instead.
# File lib/rubybreaker/runtime.rb, line 66 def self.instrument() BREAKABLES.each do |mod| # Duplicate checks in place in these calls. MonitorInstaller.install_monitor(:break, mod) end end