Class: Capybara::Rumpelstiltskin::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/capybara/rumpelstiltskin/configuration.rb

Overview

Responsible for managing the configuration of Capybara::Rumpelstiltskin

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**kargs) ⇒ Configuration

Returns a new instance of Configuration.



7
8
9
10
# File 'lib/capybara/rumpelstiltskin/configuration.rb', line 7

def initialize(**kargs)
  self.sleep_durations = kargs.fetch(:sleep_durations) { [3, 10] }
  self.handled_exceptions = kargs.fetch(:handled_exceptions) { [] }
end

Instance Attribute Details

#handled_exceptionsObject

Returns the value of attribute handled_exceptions.



12
13
14
# File 'lib/capybara/rumpelstiltskin/configuration.rb', line 12

def handled_exceptions
  @handled_exceptions
end

#sleep_durationsObject

Used to determine the number of sleeps to attempt, and the duration of each of those sleeps.

Returns:

  • An array of integers



16
17
18
# File 'lib/capybara/rumpelstiltskin/configuration.rb', line 16

def sleep_durations
  @sleep_durations
end