class Liquid::LocalFileSystem

Overview

This implements an abstract file system which retrieves template files named in a manner similar to Rails partials, ie. with the template name prefixed with an underscore. The extension ".liquid" is also added.

For security reasons, template paths are only allowed to contain letters, numbers, and underscore.

Example:

file_system = Liquid::LocalFileSystem.new("/some/path")

file_system.full_path("mypartial") # => "/some/path/_mypartial.liquid" file_system.full_path("dir/mypartial") # => "/some/path/dir/_mypartial.liquid"

Defined in:

liquid/file_system.cr

Constructors

Instance Method Summary

Instance methods inherited from class Liquid::FileSystem

read_template_file(template_path, context) read_template_file, to_liquid to_liquid

Constructor Detail

def self.new(root : String) #

[View source]

Instance Method Detail

def full_path(template_path) #

[View source]
def read_template_file(template_path, context) #

[View source]
def root : String #

[View source]
def root=(root : String) #

[View source]