Module: Datadog::AppSec::Contrib::ActiveRecord::Patcher::AdapterInheritancePatch

Defined in:
lib/datadog/appsec/contrib/active_record/patcher.rb

Instance Method Summary collapse

Instance Method Details

#inherited(subclass) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/datadog/appsec/contrib/active_record/patcher.rb', line 12

def inherited(subclass)
  super

  case subclass.name
  when "ActiveRecord::ConnectionAdapters::SQLite3Adapter" then Patcher.patch_sqlite3_adapter
  when "ActiveRecord::ConnectionAdapters::Mysql2Adapter" then Patcher.patch_mysql2_adapter
  when "ActiveRecord::ConnectionAdapters::PostgreSQLAdapter" then Patcher.patch_postgresql_adapter
  end
end