module Roda::RodaPlugins::Hooks::ClassMethods

def before(&block)

Add a before hook.
def before(&block)
  opts[:before_hooks].unshift(define_roda_method("before_hook", 0, &block))
  if opts[:before_hooks].length == 1
    class_eval("alias _roda_before_10__hooks #{opts[:before_hooks].first}", __FILE__, __LINE__)
  else
    class_eval("def _roda_before_10__hooks; #{opts[:before_hooks].join(';')} end", __FILE__, __LINE__)
  end
  private :_roda_before_10__hooks
  def_roda_before
  nil
end