Class: RequestId::Configuration
- Inherits:
-
Object
- Object
- RequestId::Configuration
- Defined in:
- lib/request_id/configuration.rb
Instance Attribute Summary collapse
-
#generate ⇒ Object
If set to true, the rack middleware will automatically generate a request id.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 |
# File 'lib/request_id/configuration.rb', line 8 def initialize @generate = defined?(Rails) && Rails.env.development? end |
Instance Attribute Details
#generate ⇒ Object
If set to true, the rack middleware will automatically generate a request id. Useful in development. Defaults to true if this is a rails app an we’re in development.
6 7 8 |
# File 'lib/request_id/configuration.rb', line 6 def generate @generate end |