Class: TypedCache::Instrumenters::Null

Inherits:
Object
  • Object
show all
Includes:
TypedCache::Instrumenter, Mixins::NamespacedSingleton
Defined in:
lib/typed_cache/instrumenters/null.rb

Overview

A no-op implementation used when instrumentation is disabled. It fulfils the Instrumenter contract but simply yields.

Instance Method Summary collapse

Methods included from Mixins::NamespacedSingleton

all, included, #initialize, #namespace

Methods included from TypedCache::Instrumenter

#enabled?, #namespace

Instance Method Details

#instrument(_operation, _key, **_payload) ⇒ Object

R

(String, String, **untyped) { -> R } -> R



15
16
17
# File 'lib/typed_cache/instrumenters/null.rb', line 15

def instrument(_operation, _key, **_payload)
  yield
end

#subscribe(_event_name, **_filters, &_block) ⇒ Object



21
22
23
# File 'lib/typed_cache/instrumenters/null.rb', line 21

def subscribe(_event_name, **_filters, &_block)
  # no-op
end