Module: Capybara::Selenium::DeprecationSuppressor

Defined in:
lib/capybara/selenium/logger_suppressor.rb

Instance Method Summary collapse

Instance Method Details

#deprecateObject


11
12
13
# File 'lib/capybara/selenium/logger_suppressor.rb', line 11

def deprecate(*)
  super unless @suppress_for_capybara
end

#initializeObject


6
7
8
9
# File 'lib/capybara/selenium/logger_suppressor.rb', line 6

def initialize(*)
  @suppress_for_capybara = false
  super
end

#suppress_deprecationsObject


15
16
17
18
19
20
# File 'lib/capybara/selenium/logger_suppressor.rb', line 15

def suppress_deprecations
  prev_suppress_for_capybara, @suppress_for_capybara = @suppress_for_capybara, true
  yield
ensure
  @suppress_for_capybara = prev_suppress_for_capybara
end