class Boa::PathHandler

Defined in:

boa/path_handler.cr

Constant Summary

INSTANCE = new

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def add_path(path : String, &block : Hash(String, String) -> _) #

[View source]
def 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. For example, the following would return the value at @paths["build stuff"] @paths.keys = ["build", "build stuff"] argv = ["build", "stuff"]


[View source]
def paths : Hash(String, Boa::Path) #

[View source]
def paths=(paths : Hash(String, Boa::Path)) #

[View source]