module Roda::RodaPlugins::MatchHook::ClassMethods

def freeze

Freeze the array of hook methods when freezing the app
def freeze
  opts[:match_hooks].freeze
  super
end

def match_hook(&block)

Add a match hook.
def match_hook(&block)
  opts[:match_hooks] << define_roda_method("match_hook", 0, &block)
  if opts[:match_hooks].length == 1
    class_eval("alias _match_hook #{opts[:match_hooks].first}", __FILE__, __LINE__)
  else
    class_eval("def _match_hook; #{opts[:match_hooks].join(';')} end", __FILE__, __LINE__)
  end
  public :_match_hook
  nil
end