Class: WProf::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/wprof/conf_wprof.rb

Constant Summary collapse

DEFAULTS_CONFIGS =
{
  db_runtime: true,
  reporter_type: 'LOGGER',
  csv_type: 'SPLIT',
  async: false,
  httparty_methods_to_trace: %w[get put delete post patch].freeze,
  external_url: nil,
  external_headers: nil,
  custom_methods: nil,
  file_path: Rails.root.to_s
}.freeze

Class Method Summary collapse

Class Method Details

.get_value(param) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/wprof/conf_wprof.rb', line 16

def get_value(param)
  unless Rails.application.nil?
    value = Rails.configuration.x.wprof[param]
    return value unless value.nil?
  end
  DEFAULTS_CONFIGS[param]
end