Class: Naught::NullClassBuilder::Commands::Callstack Private
- Inherits:
-
Naught::NullClassBuilder::Command
- Object
- Naught::NullClassBuilder::Command
- Naught::NullClassBuilder::Commands::Callstack
- Defined in:
- lib/naught/null_class_builder/commands/callstack.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Records method calls made on null objects for debugging
When enabled, each null object instance tracks all method calls made to it, including the method name, arguments, and source location. Calls are grouped into "traces" - each time a method is called directly on the original null object (rather than on a chained result), a new trace begins.
This uses lightweight proxy objects for chaining so that we can distinguish
between null.foo.bar (one trace with two calls) and null.foo; null.bar
(two traces with one call each).
Instance Attribute Summary
Attributes inherited from Naught::NullClassBuilder::Command
Instance Method Summary collapse
-
#call ⇒ void
private
Install the callstack tracking mechanism.
Methods inherited from Naught::NullClassBuilder::Command
Constructor Details
This class inherits a constructor from Naught::NullClassBuilder::Command
Instance Method Details
#call ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Install the callstack tracking mechanism
40 41 42 43 44 |
# File 'lib/naught/null_class_builder/commands/callstack.rb', line 40 def call install_call_trace_accessor install_method_missing_tracking install_chain_proxy_class end |