Class: Rack::PerftoolsProfiler::ProfileDataAction
- Inherits:
-
Action
- Object
- Action
- Rack::PerftoolsProfiler::ProfileDataAction
show all
- Defined in:
- lib/rack/perftools_profiler/profile_data_action.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Action
#act, for_env, #initialize
Class Method Details
.check_printer(printer, env = nil) ⇒ Object
11
12
13
14
15
16
|
# File 'lib/rack/perftools_profiler/profile_data_action.rb', line 11
def self.check_printer(printer, env=nil)
if printer != nil && printer != '' && !ProfilerMiddleware::PRINTERS.member?(printer.to_sym)
message = "Invalid printer type: #{printer}. Valid printer values are #{ProfilerMiddleware::PRINTERS.join(", ")}"
raise ProfilerArgumentError, message
end
end
|
Instance Method Details
#check_printer_arg ⇒ Object
5
6
7
8
9
|
# File 'lib/rack/perftools_profiler/profile_data_action.rb', line 5
def check_printer_arg
request = Rack::Request.new(@env)
printer = request.GET['printer']
self.class.check_printer(printer, @env)
end
|