class

Wikicr::Page::Index

Inherits YAML::Serializable / Lockable / Reference / Object

Constructors

new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Source
new(file : String)
Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source

Class methods

read(file : String)
Source
url_closeness(from : String, to : String)

Computes the amount of common chars at the beginning of each string

Source

Instance methods

[](page : Wikicr::Page) : Index::Entry

Add a new Entry.

Source
[]?(page : Wikicr::Page) : Index::Entry | Nil

Add a new Entry.

Source
add(page : Wikicr::Page)

Add a new Entry.

Source
delete(page : Wikicr::Page)

Remove an Entry from the Index based on its path.

Source
entries
Source
entries=(entries : Hash(String, Entry))
Source
file
Source
file=(file : String)
Source
find(text : String, context : Page) : Tuple(String, String)

Find a matching text into the Index. If no matching content, return a default value.

Source
load!

Replace the old Index using the state registrated into the file.

Source
save!

Save the current state into the file

Source

Nested types