Deprecated options
# File Ruby/lib/mini_profiler/config.rb, line 5 def self.attr_accessor(*vars) @attributes ||= [] @attributes.concat vars super(*vars) end
# File Ruby/lib/mini_profiler/config.rb, line 11 def self.attributes @attributes end
# File Ruby/lib/mini_profiler/config.rb, line 23 def self.default new.instance_eval { @auto_inject = true # automatically inject on every html page @base_url_path = "/mini-profiler-resources/" # called prior to rack chain, to ensure we are allowed to profile @pre_authorize_cb = lambda {|env| true} # called after rack chain, to ensure we are REALLY allowed to profile @position = 'left' # Where it is displayed @skip_schema_queries = false @storage = MiniProfiler::MemoryStore @user_provider = Proc.new{|env| Rack::Request.new(env).ip} @authorization_mode = :allow_all @toggle_shortcut = 'Alt+P' @start_hidden = false self } end
# File Ruby/lib/mini_profiler/config.rb, line 43 def merge!(config) return unless config if Hash === config config.each{|k,v| instance_variable_set "@#{k}",v} else self.class.attributes.each{ |k| v = config.send k instance_variable_set "@#{k}", v if v } end end