The match_hook plugin adds hooks that are called upon a successful match by any of the matchers.
plugin :match_hook match_hook do logger.debug("#{request.matched_path} matched. #{request.remaining_path} remaining.") end
Classes and Modules
Public Class methods
configure(app)
[show source]
# File lib/roda/plugins/match_hook.rb 15 def self.configure(app) 16 app.opts[:match_hooks] ||= [] 17 end