Class: Rack::WebProfiler::Config
- Inherits:
-
Object
- Object
- Rack::WebProfiler::Config
- 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
-
#collectors ⇒ Object
Returns the value of attribute collectors.
-
#tmp_dir ⇒ Object
protected.
Instance Method Summary collapse
-
#build! ⇒ Object
Setup the configuration.
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
14 15 16 17 18 |
# File 'lib/rack/web_profiler/config.rb', line 14 def initialize @collectors = Rack::WebProfiler::Collectors.new load_defaults! end |
Instance Attribute Details
#collectors ⇒ Object
Returns the value of attribute collectors.
6 7 8 |
# File 'lib/rack/web_profiler/config.rb', line 6 def collectors @collectors end |
#tmp_dir ⇒ Object
protected
30 31 32 |
# File 'lib/rack/web_profiler/config.rb', line 30 def tmp_dir @tmp_dir end |
Instance Method Details
#build! ⇒ Object
Setup the configuration
21 22 23 24 25 26 |
# File 'lib/rack/web_profiler/config.rb', line 21 def build! unless block_given? # @todo raise an Exception if no block given end instance_eval(&Proc.new) end |