Class: Errordeck::Scrubber::Url
- Inherits:
-
Object
- Object
- Errordeck::Scrubber::Url
- Defined in:
- lib/errordeck/scrubber/url.rb
Instance Method Summary collapse
-
#initialize(url, filter = nil) ⇒ Url
constructor
A new instance of Url.
-
#scrub ⇒ Object
remove sensitive data from url.
Constructor Details
#initialize(url, filter = nil) ⇒ Url
Returns a new instance of Url.
6 7 8 9 |
# File 'lib/errordeck/scrubber/url.rb', line 6 def initialize(url, filter = nil) @url = url @filter = filter || Errordeck::Scrubber::SENSITIVE_PARAMS end |
Instance Method Details
#scrub ⇒ Object
remove sensitive data from url
12 13 14 15 16 |
# File 'lib/errordeck/scrubber/url.rb', line 12 def scrub uri = URI.parse(@url) uri.query = Errordeck::Scrubber::QueryParam.new(uri.query, @filter).scrub uri.to_s end |