Class: Selenium::WebDriver::BiDi::FilterBy

Inherits:
Object
  • Object
show all
Defined in:
lib/selenium/webdriver/bidi/log/filter_by.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(level) ⇒ FilterBy

Returns a new instance of FilterBy.



26
27
28
# File 'lib/selenium/webdriver/bidi/log/filter_by.rb', line 26

def initialize(level)
  @level = level
end

Instance Attribute Details

#levelObject

Returns the value of attribute level.



24
25
26
# File 'lib/selenium/webdriver/bidi/log/filter_by.rb', line 24

def level
  @level
end

Class Method Details

.log_level(level = nil) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/selenium/webdriver/bidi/log/filter_by.rb', line 30

def self.log_level(level = nil)
  unless %w[debug error info warning].include?(level)
    raise Error::WebDriverError,
          "Valid log levels are 'debug', 'error', 'info' and 'warning'. Received: #{level}"
  end
  FilterBy.new(level)
end