Class: TheMechanic2::Configuration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_callbackObject

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_authenticationObject

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

#timeoutObject

Maximum execution time for benchmarks in seconds



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

def timeout
  @timeout
end