Class: DatabaseCleaner::Deprecator

Inherits:
Object
  • Object
show all
Defined in:
lib/database_cleaner/deprecation.rb

Instance Method Summary collapse

Constructor Details

#initializeDeprecator

Returns a new instance of Deprecator.


10
11
12
# File 'lib/database_cleaner/deprecation.rb', line 10

def initialize
  @methods_already_warned = {}
end

Instance Method Details

#deprecate(method, message) ⇒ Object


14
15
16
17
18
# File 'lib/database_cleaner/deprecation.rb', line 14

def deprecate method, message
  return if @methods_already_warned.key?(method)
  $stderr.puts message
  @methods_already_warned[method] = true
end