Class: Capybara::Presenter::Configuration

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

Overview

Configuration class for Capybara::Presenter settings. Manages global settings like delays, notifications, and environment variable parsing.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



10
11
12
13
14
15
16
# File 'lib/capybara/presenter/configuration.rb', line 10

def initialize
  @enabled = ENV['PRESENTER_MODE'] == 'true'
  @delay = parse_float_env('PRESENTER_DELAY', 2.0)
  @notifications = ENV['PRESENTER_NOTIFICATIONS'] != 'false'
  @notification_position = :center
  @test_start_delay = parse_float_env('PRESENTER_TEST_START_DELAY', 2.0)
end

Instance Attribute Details

#delayObject

Returns the value of attribute delay.



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

def delay
  @delay
end

#enabledObject

Returns the value of attribute enabled.



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

def enabled
  @enabled
end

#notification_positionObject

Returns the value of attribute notification_position.



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

def notification_position
  @notification_position
end

#notificationsObject

Returns the value of attribute notifications.



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

def notifications
  @notifications
end

#test_start_delayObject

Returns the value of attribute test_start_delay.



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

def test_start_delay
  @test_start_delay
end