Class: Rack::WebProfiler::Collector::Definition
- Inherits:
-
Object
- Object
- Rack::WebProfiler::Collector::Definition
- Defined in:
- lib/rack/web_profiler/collector.rb
Overview
Definition
Collector definition.
Instance Attribute Summary collapse
-
#collect ⇒ Object
Returns the value of attribute collect.
-
#data_storage ⇒ Object
readonly
Returns the value of attribute data_storage.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#is_enabled ⇒ Object
Returns the value of attribute is_enabled.
-
#klass ⇒ Object
Returns the value of attribute klass.
-
#label ⇒ Object
Returns the value of attribute label.
-
#position ⇒ Object
Returns the value of attribute position.
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
-
#collect!(request, response) ⇒ Rack::WebProfiler::Collector::DSL::DataStorage
Collect the data who the Collector need.
-
#is_enabled? ⇒ Boolean
Is the collector enabled.
Instance Attribute Details
#collect ⇒ Object
Returns the value of attribute collect.
79 80 81 |
# File 'lib/rack/web_profiler/collector.rb', line 79 def collect @collect end |
#data_storage ⇒ Object (readonly)
Returns the value of attribute data_storage.
80 81 82 |
# File 'lib/rack/web_profiler/collector.rb', line 80 def data_storage @data_storage end |
#icon ⇒ Object
Returns the value of attribute icon.
79 80 81 |
# File 'lib/rack/web_profiler/collector.rb', line 79 def icon @icon end |
#identifier ⇒ Object
Returns the value of attribute identifier.
79 80 81 |
# File 'lib/rack/web_profiler/collector.rb', line 79 def identifier @identifier end |
#is_enabled ⇒ Object
Returns the value of attribute is_enabled.
79 80 81 |
# File 'lib/rack/web_profiler/collector.rb', line 79 def is_enabled @is_enabled end |
#klass ⇒ Object
Returns the value of attribute klass.
79 80 81 |
# File 'lib/rack/web_profiler/collector.rb', line 79 def klass @klass end |
#label ⇒ Object
Returns the value of attribute label.
79 80 81 |
# File 'lib/rack/web_profiler/collector.rb', line 79 def label @label end |
#position ⇒ Object
Returns the value of attribute position.
79 80 81 |
# File 'lib/rack/web_profiler/collector.rb', line 79 def position @position end |
#template ⇒ Object
Returns the value of attribute template.
79 80 81 |
# File 'lib/rack/web_profiler/collector.rb', line 79 def template @template end |
Instance Method Details
#collect!(request, response) ⇒ Rack::WebProfiler::Collector::DSL::DataStorage
Collect the data who the Collector need.
88 89 90 |
# File 'lib/rack/web_profiler/collector.rb', line 88 def collect!(request, response) @data_storage = Docile.dsl_eval(DataStorage.new, request, response, &collect) end |
#is_enabled? ⇒ Boolean
Is the collector enabled.
95 96 97 98 |
# File 'lib/rack/web_profiler/collector.rb', line 95 def is_enabled? return !!@is_enabled.call if @is_enabled.is_a?(Proc) !!@is_enabled end |