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

Defined in:
core/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



36
37
38
39
40
41
42
# File 'core/lib/rom/plugins/relation/instrumentation.rb', line 36

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