Class: WireTap::RequestParser
- Inherits:
-
Object
- Object
- WireTap::RequestParser
- Defined in:
- lib/wire_tap/parsers/request_parser.rb
Class Method Summary collapse
Class Method Details
.clean(kv_pairs) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/wire_tap/parsers/request_parser.rb', line 8 def clean kv_pairs kv_pairs.reduce({}) do |result, kv| key,value = kv value = value.first if value.length <=1 result[key] = value result end end |
.parse(request) ⇒ Object
5 6 7 |
# File 'lib/wire_tap/parsers/request_parser.rb', line 5 def parse request clean(CGI.parse(request)) end |