Module: MetrixWire::Instrument::Sqlite3
- Defined in:
- lib/metrixwire/instrument/sqlite3.rb
Overview
Best-effort patch of the sqlite3 gem (SQLite3::Database#execute).
Guarded: skips silently if the gem isn't loaded.
Defined Under Namespace
Modules: Patch
Class Method Summary collapse
Class Method Details
.install ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/metrixwire/instrument/sqlite3.rb', line 10 def install return unless defined?(::SQLite3::Database) return if ::SQLite3::Database.instance_variable_get(:@__metrixwire_patched) ::SQLite3::Database.prepend(Patch) ::SQLite3::Database.instance_variable_set(:@__metrixwire_patched, true) rescue StandardError nil end |