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
87 88 89 90 |
# File 'lib/appsignal/extension.rb', line 87 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
96 97 98 |
# File 'lib/appsignal/extension.rb', line 96 def to_s "{}" end |