Skip to content

Commit

Permalink
Update example code in match_hook_args plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed Aug 10, 2023
1 parent f7c2752 commit eb86c09
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/roda/plugins/match_hook_args.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,24 @@ module RodaPlugins
# end
#
# # Term is an implicit matcher used for terminating matches, and
# # will be included in the array of matchers yielded to match block
# # will be included in the array of matchers yielded to the match hook
# # if a terminating match is used.
# term = self.class::RodaRequest::TERM
#
# route do |r|
# r.root do
# # for a request for /
# # matchers: nil, block_args: nil
# end
#
# r.on 'a', ['b', 'c'], Integer |segment, id|
# # for a request for /a/b/1:
# # matchers: ['a', ['b', 'c'], Integer], block_args: ['b', 1]
# # for a request for /a/b/1
# # matchers: ["a", ["b", "c"], Integer], block_args: ["b", 1]
# end
#
# r.get 'd' |segment, id|
# # for a request for /d
# # matchers: ['d', term], block_args: []
# # matchers: ["d", term], block_args: []
# end
# end
module MatchHookArgs
Expand Down

0 comments on commit eb86c09

Please sign in to comment.