Module: NewRelic::Security::Instrumentation::Padrino::Router::Chain

Defined in:
lib/newrelic_security/instrumentation-security/padrino/chain.rb

Class Method Summary collapse

Class Method Details

.instrument!Object



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/newrelic_security/instrumentation-security/padrino/chain.rb', line 27

def self.instrument!
  ::Padrino::Router.class_eval do
    include NewRelic::Security::Instrumentation::Padrino::Router

    alias_method :call_without_security, :call

    def call(env, &block)
      retval = call_without_security(env, &block)
      call_on_exit(retval) { return retval }
    end
  end
end