module Roda::RodaPlugins::ParamMatchers::RequestMethods

def match_param(key)

Adds match to the captures.
Match the given parameter if present, even if the parameter is empty.
def match_param(key)
  if v = params[key.to_s]
    @captures << v
  end
end

def match_param!(key)

Adds match to the captures.
Match the given parameter if present and not empty.
def match_param!(key)
  if (v = params[key.to_s]) && !v.empty?
    @captures << v
  end
end

def match_params(keys)

Adds all matches to the captures.
Match all given parameters if present, even if any/all parameters is empty.
def match_params(keys)
  keys.each do |key|
    return false unless match_param(key)
  end
end

def match_params!(keys)

Adds all matches to the captures.
Match all given parameters if present and not empty.
def match_params!(keys)
  keys.each do |key|
    return false unless match_param!(key)
  end
end