module Roda::RodaPlugins::StaticRouting::ClassMethods

def add_static_route(method, path, &block)

Add a static route for the given method.
def add_static_route(method, path, &block)
  (opts[:static_routes][path] ||= {})[method] = block
end

def freeze

Freeze the static route metadata when freezing the app.
def freeze
  opts[:static_routes].freeze
  opts[:static_routes].each_value(&:freeze)
  super
end

def inherited(subclass)

Duplicate static route metadata in subclass.
def inherited(subclass)
  super
  static_routes = subclass.opts[:static_routes]
  opts[:static_routes].each do |k, v|
    static_routes[k] = v.dup
  end
end

def static_route(path, &block)

still allowing request method specific handling.
methods inside the route for handling shared behavior while
static_get), but allow you to use Roda's routing tree
tried after the request method specific static routes (e.g.
Add a static route for any request method. These are
def static_route(path, &block)
  add_static_route(nil, path, &block)
end

def static_route_for(method, path)

Return the static route for the given request method and path.
def static_route_for(method, path)
  if h = opts[:static_routes][path]
    h[method] || h[nil]
  end
end