Class: Appsignal::Extension::MockData
- Defined in:
- lib/appsignal/extension.rb
Overview
Mock of the Data 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.
This class inherits from the Data class so that it passes type checks.
Instance Method Summary collapse
-
#initialize(*_args) ⇒ MockData
constructor
rubocop:disable Lint/MissingSuper.
- #method_missing(_method, *_args, &_block) ⇒ Object
- #to_s ⇒ Object
Methods inherited from Data
#==, #append_boolean, #append_data, #append_float, #append_integer, #append_nil, #append_string, #inspect, #set_boolean, #set_data, #set_float, #set_integer, #set_nil, #set_string
Constructor Details
#initialize(*_args) ⇒ MockData
rubocop:disable Lint/MissingSuper
91 92 93 94 |
# File 'lib/appsignal/extension.rb', line 91 def initialize(*_args) # rubocop:disable Lint/MissingSuper # JRuby extension requirement, as it sends a pointer to the Data object # when creating it end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Method Details
#to_s ⇒ Object
100 101 102 |
# File 'lib/appsignal/extension.rb', line 100 def to_s "{}" end |