Class: Capybara::Presenter::Configuration
- Inherits:
-
Object
- Object
- Capybara::Presenter::Configuration
- 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
-
#delay ⇒ Object
Returns the value of attribute delay.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#notification_position ⇒ Object
Returns the value of attribute notification_position.
-
#notifications ⇒ Object
Returns the value of attribute notifications.
-
#test_start_delay ⇒ Object
Returns the value of attribute test_start_delay.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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
#delay ⇒ Object
Returns the value of attribute delay.
8 9 10 |
# File 'lib/capybara/presenter/configuration.rb', line 8 def delay @delay end |
#enabled ⇒ Object
Returns the value of attribute enabled.
8 9 10 |
# File 'lib/capybara/presenter/configuration.rb', line 8 def enabled @enabled end |
#notification_position ⇒ Object
Returns the value of attribute notification_position.
8 9 10 |
# File 'lib/capybara/presenter/configuration.rb', line 8 def notification_position @notification_position end |
#notifications ⇒ Object
Returns the value of attribute notifications.
8 9 10 |
# File 'lib/capybara/presenter/configuration.rb', line 8 def notifications @notifications end |
#test_start_delay ⇒ Object
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 |