Class: Wayfarer::Middleware::UriParser
- Inherits:
-
Object
- Object
- Wayfarer::Middleware::UriParser
- Extended by:
- Base
- Defined in:
- lib/wayfarer/middleware/uri_parser.rb
Defined Under Namespace
Modules: API
Constant Summary
Constants included from Base
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#call(task) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/wayfarer/middleware/uri_parser.rb', line 18 def call(task) # TODO: Test task[:uri] ||= begin Addressable::URI.parse(task.url).normalize rescue Addressable::URI::InvalidURIError => e return log(:invalid, task, message: e.) end yield if block_given? end |