Class | Hike::Index |
In: |
lib/hike/index.rb
|
Parent: | Object |
aliases | [R] | `Index#aliases` is an immutable `Hash` mapping an extension to an `Array` of aliases. |
extensions | [R] | `Index#extensions` is an immutable `Extensions` collection. |
paths | [R] | `Index#paths` is an immutable `Paths` collection. |
`Index.new` is an internal method. Instead of constructing it directly, create a `Trail` and call `Trail#index`.
A cached version of `Dir.entries` that filters out `.` files and `~` swap files. Returns an empty `Array` if the directory does not exist.
The real implementation of `find`. `Trail#find` generates a one time index and delegates here.
See `Trail#find` for usage.
Returns a `Regexp` that matches the allowed extensions.
pattern_for("index.html") #=> /^index(.html|.htm)(.builder|.erb)*$/
Sorts candidate matches by their extension priority. Extensions in the front of the `extensions` carry more weight.