Class: Rack::WebProfiler::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/web_profiler/config.rb

Overview

Config

Constant Summary collapse

DEFAULT_COLLECTORS =
[
  Rack::WebProfiler::Collectors::RackCollector,
  Rack::WebProfiler::Collectors::RequestCollector,
  Rack::WebProfiler::Collectors::RubyCollector,
  Rack::WebProfiler::Collectors::TimeCollector,
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Initialize Config.



17
18
19
20
21
# File 'lib/rack/web_profiler/config.rb', line 17

def initialize
  @collectors = Rack::WebProfiler::Collectors.new

  load_defaults!
end

Instance Attribute Details

#collectorsObject

Returns the value of attribute collectors.



7
8
9
# File 'lib/rack/web_profiler/config.rb', line 7

def collectors
  @collectors
end

#tmp_dirObject

protected



33
34
35
# File 'lib/rack/web_profiler/config.rb', line 33

def tmp_dir
  @tmp_dir
end

Instance Method Details

#build!Object

Setup the configuration



24
25
26
27
28
29
# File 'lib/rack/web_profiler/config.rb', line 24

def build!
  unless block_given?
    # @todo raise an Exception if no block given
  end
  instance_eval(&Proc.new)
end