Module: Simple::SQL::MonkeyPatches

Defined in:
lib/simple/sql/monkey_patches.rb

Overview

rubocop:disable Lint/DuplicateMethods

Class Method Summary collapse

Class Method Details

.warn(msg) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/simple/sql/monkey_patches.rb', line 6

def self.warn(msg)
  return if ENV["SIMPLE_SQL_SILENCE"] == "1"

  @@warned ||= {}
  return if @@warned[msg]

  @@warned[msg] = true

  STDERR.puts "== monkeypatch warning: #{msg} (set SIMPLE_SQL_SILENCE=1 to disable)"
end