class ActionDispatch::Routing::Mapper::Mapping

def check_part(name, part, path_params, hash)

Experimental RBS support (using type sampling data from the type_fusion project).

def check_part: (Symbol name, String part, Array[Symbol] path_params, Hash hash) -> untyped

This signature was generated using 2 samples from 1 application.

def check_part(name, part, path_params, hash)
  if part
    hash[name] = yield(part)
  else
    unless path_params.include?(name)
      message = "Missing :#{name} key on routes definition, please check your routes."
      raise ArgumentError, message
    end
  end
  hash
end