Class: NewRelic::ChainedCall

Inherits:
Object
  • Object
show all
Defined in:
lib/new_relic/agent/chained_call.rb

Overview

This class is used by NewRelic::Agent.set_sql_obfuscator to chain multiple obfuscation blocks when not using the default :replace action

Instance Method Summary collapse

Constructor Details

#initialize(block1, block2) ⇒ ChainedCall

Returns a new instance of ChainedCall.



8
9
10
11
# File 'lib/new_relic/agent/chained_call.rb', line 8

def initialize(block1, block2)
  @block1 = block1
  @block2 = block2
end

Instance Method Details

#call(sql) ⇒ Object



13
14
15
16
# File 'lib/new_relic/agent/chained_call.rb', line 13

def call(sql)
  sql = @block1.call(sql)
  @block2.call(sql)
end