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
Initialize Config.
Constructor Details
#initialize ⇒ Config
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
#collectors ⇒ Object
Returns the value of attribute collectors.
7 8 9 |
# File 'lib/rack/web_profiler/config.rb', line 7 def collectors @collectors end |
#tmp_dir ⇒ Object
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 |