Sugar.Views.Finder

Allows for finding of templates within an applications to pass off to Templates for compiling/rendering.

Source

Summary

all(root)

Finds all templates within root

one(root, key)

Finds a template within root and with a given key

Functions

all(root)

Specs:

  • all(binary) :: [Sugar.Templates.Template.t]

Finds all templates within root

Arguments

  • root - String - path to search for templates

Returns

List of Sugar.Templates.Template

Source
one(root, key)

Specs:

  • one(binary, binary) :: Sugar.Templates.Template.t | {:error, :notfound}

Finds a template within root and with a given key

Arguments

  • root - String - path to search for template
  • key - String - key (aka local path) of template desired

Returns

Sugar.Templates.Template

Source