Class: Appsignal::Extension::MockTransaction Private
- Defined in:
- lib/appsignal/extension.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.
Mock of the Transaction class. This mock is used when the extension cannot be loaded. This mock listens to all method calls and does nothing, and prevents NoMethodErrors from being raised.
Disabled in testing so we can make sure that we don’t miss an extension function implementation.
Instance Method Summary collapse
-
#initialize(*_args) ⇒ MockTransaction
constructor
private
A new instance of MockTransaction.
- #method_missing(_method, *_args, &_block) ⇒ Object private
Constructor Details
#initialize(*_args) ⇒ MockTransaction
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.
Returns a new instance of MockTransaction.
108 109 110 111 |
# File 'lib/appsignal/extension.rb', line 108 def initialize(*_args) # JRuby extension requirement, as it sends a pointer to the Transaction # object when creating it end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(_method, *_args, &_block) ⇒ Object
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.
113 114 115 |
# File 'lib/appsignal/extension.rb', line 113 def method_missing(_method, *_args, &_block) super if Appsignal.testing? end |