Class: RequestId::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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

#generateObject

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