Module: Brut::Instrumentation::Methods

Defined in:
lib/brut/instrumentation/methods.rb

Overview

Allows instrumentation of methods via a class method. While Pages, Handlers, and Components are generally instrumented, this module can be used for your back-end classes (or private methods of pages, handlers, or component).

Examples:

Instrument specific methods

class Widget
  include Brut::Instrumentation::Methods

  def save
    # ...
  end

  def search
    # ...
  end

  instrument :save # search is not instrumented
end

Instrument all methods

class Widget
  include Brut::Instrumentation::Methods

  instrument_all!

  def save
    # ...
  end

  def search
    # ...
  end

private

  def delete_orphans
  end
end

Defined Under Namespace

Modules: ClassMethods