class Boa::PathHandler
- Boa::PathHandler
- Reference
- Object
Defined in:
boa/path_handler.crConstant Summary
-
INSTANCE =
new
Constructors
Instance Method Summary
- #add_path(path : String, &block : Hash(String, String) -> _)
-
#lookup_path(argv) : Tuple(Path, Array(String))
Finds the best match in a Hash for an array of strings, the best match being the longest key found.
- #paths : Hash(String, Boa::Path)
- #paths=(paths : Hash(String, Boa::Path))
Constructor Detail
Instance Method Detail
Finds the best match in a Hash for an array of strings, the best match being the longest key found. For example, the following would return the value at @paths["build stuff"] @paths.keys = ["build", "build stuff"] argv = ["build", "stuff"]