class Oak::Tree(T)

Included Modules

Defined in:

oak/tree.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def add(path : String, payload : T) #

Adds a path to the tree.


[View source]
def each(*args, **options) #

Iterate over each result


[View source]
def each(*args, **options, &) #

Iterate over each result


[View source]
def find(path) #

Finds the first matching result.


[View source]
def key : String #

The key of the current tree branch


[View source]
def results #

Lists all the results possible within the entire tree.


[View source]
def search(path) #

Searchs the Tree and returns all results as an array.


[View source]
def search(path, &block : Result(T) -> _) #

Searches the Tree and yields each result to the block.


[View source]
def visualize #

Returns a string visualization of the Radix tree


[View source]