Class: TheMechanic2::Configuration
- Inherits:
-
Object
- Object
- TheMechanic2::Configuration
- Defined in:
- lib/the_mechanic_2/configuration.rb
Overview
Configuration class for The Mechanic engine Allows customization of timeout, authentication, and other settings
Instance Attribute Summary collapse
-
#authentication_callback ⇒ Object
Proc/lambda to call for authentication check Should accept a controller instance and return true/false.
-
#enable_authentication ⇒ Object
Whether to require authentication before allowing benchmark execution.
-
#timeout ⇒ Object
Maximum execution time for benchmarks in seconds.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 21 |
# File 'lib/the_mechanic_2/configuration.rb', line 17 def initialize @timeout = 30 # seconds @enable_authentication = false @authentication_callback = nil end |
Instance Attribute Details
#authentication_callback ⇒ Object
Proc/lambda to call for authentication check Should accept a controller instance and return true/false
15 16 17 |
# File 'lib/the_mechanic_2/configuration.rb', line 15 def authentication_callback @authentication_callback end |
#enable_authentication ⇒ Object
Whether to require authentication before allowing benchmark execution
11 12 13 |
# File 'lib/the_mechanic_2/configuration.rb', line 11 def enable_authentication @enable_authentication end |
#timeout ⇒ Object
Maximum execution time for benchmarks in seconds
8 9 10 |
# File 'lib/the_mechanic_2/configuration.rb', line 8 def timeout @timeout end |