Module: ROM::Plugins::Relation::Instrumentation::ClassInterface Private

Defined in:
lib/rom/plugins/relation/instrumentation.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instrumentation extension for relation classes

Instance Method Summary collapse

Instance Method Details

#instrument(*methods) ⇒ Object

Configure provided methods for instrumentation

Parameters:

  • methods (Array<Symbol>)

    A list of method names


38
39
40
41
42
43
44
# File 'lib/rom/plugins/relation/instrumentation.rb', line 38

def instrument(*methods)
  (methods - Instrumentation.mixin.instance_methods).each do |meth|
    Instrumentation.mixin.send(:define_method, meth) do
      instrument { super() }
    end
  end
end