Module: Datadog::Contrib::ActiveSupport::Cache::Patcher
- Includes:
- Patcher
- Defined in:
- lib/ddtrace/contrib/active_support/cache/patcher.rb
Overview
Patcher enables patching of ‘active_support’ module.
Class Method Summary collapse
- .cache_store_class(meth) ⇒ Object
- .patch ⇒ Object
- .patch_cache_store_delete ⇒ Object
- .patch_cache_store_fetch ⇒ Object
- .patch_cache_store_read ⇒ Object
- .patch_cache_store_write ⇒ Object
- .target_version ⇒ Object
Methods included from Patcher
Class Method Details
.cache_store_class(meth) ⇒ Object
25 26 27 |
# File 'lib/ddtrace/contrib/active_support/cache/patcher.rb', line 25 def cache_store_class(meth) ::ActiveSupport::Cache::Store end |
.patch ⇒ Object
18 19 20 21 22 23 |
# File 'lib/ddtrace/contrib/active_support/cache/patcher.rb', line 18 def patch patch_cache_store_read patch_cache_store_fetch patch_cache_store_write patch_cache_store_delete end |
.patch_cache_store_delete ⇒ Object
41 42 43 |
# File 'lib/ddtrace/contrib/active_support/cache/patcher.rb', line 41 def patch_cache_store_delete cache_store_class(:delete).send(:prepend, Cache::Instrumentation::Delete) end |
.patch_cache_store_fetch ⇒ Object
33 34 35 |
# File 'lib/ddtrace/contrib/active_support/cache/patcher.rb', line 33 def patch_cache_store_fetch cache_store_class(:fetch).send(:prepend, Cache::Instrumentation::Fetch) end |
.patch_cache_store_read ⇒ Object
29 30 31 |
# File 'lib/ddtrace/contrib/active_support/cache/patcher.rb', line 29 def patch_cache_store_read cache_store_class(:read).send(:prepend, Cache::Instrumentation::Read) end |
.patch_cache_store_write ⇒ Object
37 38 39 |
# File 'lib/ddtrace/contrib/active_support/cache/patcher.rb', line 37 def patch_cache_store_write cache_store_class(:write).send(:prepend, Cache::Instrumentation::Write) end |
.target_version ⇒ Object
14 15 16 |
# File 'lib/ddtrace/contrib/active_support/cache/patcher.rb', line 14 def target_version Integration.version end |