Class: OneApm::ChainedCall

Inherits:
Object
  • Object
show all
Defined in:
lib/one_apm/support/chained_call.rb

Overview

This class is used by OneApm::Manager.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.



6
7
8
9
# File 'lib/one_apm/support/chained_call.rb', line 6

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

Instance Method Details

#call(sql) ⇒ Object



11
12
13
14
# File 'lib/one_apm/support/chained_call.rb', line 11

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