Class: Capybara::Maleficent::Configuration
- Inherits:
-
Object
- Object
- Capybara::Maleficent::Configuration
- Defined in:
- lib/capybara/maleficent/configuration.rb
Overview
Responsible for managing the configuration of Capybara::Maleficent
Instance Attribute Summary collapse
-
#handled_exceptions ⇒ Object
Returns the value of attribute handled_exceptions.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#sleep_durations ⇒ Object
Used to determine the number of sleeps to attempt, and the duration of each of those sleeps.
Instance Method Summary collapse
-
#initialize(**kargs) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(**kargs) ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 |
# File 'lib/capybara/maleficent/configuration.rb', line 8 def initialize(**kargs) self.sleep_durations = kargs.fetch(:sleep_durations) { [3, 10] } self.handled_exceptions = kargs.fetch(:handled_exceptions) { [] } self.logger = kargs.fetch(:logger) { Capybara::Maleficent::Logger.new } end |
Instance Attribute Details
#handled_exceptions ⇒ Object
Returns the value of attribute handled_exceptions.
14 15 16 |
# File 'lib/capybara/maleficent/configuration.rb', line 14 def handled_exceptions @handled_exceptions end |
#logger ⇒ Object
Returns the value of attribute logger.
16 17 18 |
# File 'lib/capybara/maleficent/configuration.rb', line 16 def logger @logger end |
#sleep_durations ⇒ Object
Used to determine the number of sleeps to attempt, and the duration of each of those sleeps.
20 21 22 |
# File 'lib/capybara/maleficent/configuration.rb', line 20 def sleep_durations @sleep_durations end |