Class: Rack::PerftoolsProfiler::ReturnData
- Inherits:
-
ProfileDataAction
- Object
- Action
- ProfileDataAction
- Rack::PerftoolsProfiler::ReturnData
- Defined in:
- lib/rack/perftools_profiler/return_data.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ ReturnData
constructor
A new instance of ReturnData.
- #response ⇒ Object
Methods inherited from ProfileDataAction
check_printer, #check_printer_arg
Methods inherited from Action
Constructor Details
#initialize(*args) ⇒ ReturnData
Returns a new instance of ReturnData.
5 6 7 8 |
# File 'lib/rack/perftools_profiler/return_data.rb', line 5 def initialize(*args) super check_printer_arg end |
Instance Method Details
#response ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/rack/perftools_profiler/return_data.rb', line 10 def response if @profiler.profiling? [400, {'Content-Type' => 'text/plain'}, ['No profiling data available.']] else @middleware.profiler_data_response(@profiler.data(@data_params)) end end |