Class: Rack::WebProfiler::Collectors::RequestCollector

Inherits:
Object
  • Object
show all
Includes:
Rack::WebProfiler::Collector::DSL
Defined in:
lib/rack/web_profiler/collectors/request_collector.rb

Class Method Summary collapse

Methods included from Rack::WebProfiler::Collector::DSL

included

Class Method Details

.hash_stringify_values(hash) ⇒ Object



48
49
50
51
# File 'lib/rack/web_profiler/collectors/request_collector.rb', line 48

def hash_stringify_values(hash)
  return {} unless hash.kind_of?(Hash)
  hash.collect {|k,v| [k, v.to_s]}
end

.request_post(request) ⇒ Object



42
43
44
45
46
# File 'lib/rack/web_profiler/collectors/request_collector.rb', line 42

def request_post(request)
  request.POST if request.POST && !request.POST.empty?
rescue Exception
  nil
end