Class: RailsApiProfiler::Configuration
- Inherits:
-
Object
- Object
- RailsApiProfiler::Configuration
- Defined in:
- lib/rails_api_profiler/configuration.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#slow_request_threshold ⇒ Object
Returns the value of attribute slow_request_threshold.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rails_api_profiler/configuration.rb', line 9 def initialize @enabled = true @slow_request_threshold = 500 @logger = if defined?(Rails) && Rails.respond_to?(:logger) && Rails.logger Rails.logger else Logger.new($stdout) end end |
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
5 6 7 |
# File 'lib/rails_api_profiler/configuration.rb', line 5 def enabled @enabled end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/rails_api_profiler/configuration.rb', line 5 def logger @logger end |
#slow_request_threshold ⇒ Object
Returns the value of attribute slow_request_threshold.
5 6 7 |
# File 'lib/rails_api_profiler/configuration.rb', line 5 def slow_request_threshold @slow_request_threshold end |