Class: DatabaseCleaner::Deprecator
- Inherits:
-
Object
- Object
- DatabaseCleaner::Deprecator
- Defined in:
- lib/database_cleaner/deprecation.rb
Instance Method Summary collapse
- #deprecate(method, message) ⇒ Object
-
#initialize ⇒ Deprecator
constructor
A new instance of Deprecator.
Constructor Details
#initialize ⇒ Deprecator
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, return if @methods_already_warned.key?(method) $stderr.puts @methods_already_warned[method] = true end |