Sugar v0.4.11 Sugar.Views.Finder

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

Summary

Functions

Finds all templates within root

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

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