class Teeplate::Renderer

Defined in:

lib/renderer.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(out_path : String, force : Bool, interact : Bool, list : Bool, color : Bool, per_entry : Bool, quit : Bool) #

[View source]

Instance Method Detail

def <<(entries : Array(AsDataEntry)) #

Appends data entries.


[View source]
def <<(entry : AsDataEntry) #

Appends a data entry.


[View source]
def colorizes? : Bool #

Tests if rendering results should be colorized.


[View source]
def forces? : Bool #

Tests if overwriting should be forced.


[View source]
def interactive? : Bool #

Tests if overwriting should be done after confirmation.


[View source]
def listing? : Bool #

Tests if rendering results should be printed.


[View source]
def new_rendering_entry(data) #

Creates and returns a new rendering entry with a specified data entry.

Overrides this method if you want to use a custom class.


[View source]
def out_path : String #

Returns the base output location.


[View source]
def per_entry? : Bool #

Tests if files should be rendered per file.

If true, the renderer executes writing after each time overwriting is confirmed.

Otherwise, all files are rendered at once after all confirmations are finished.

This condition means nothing if overwriting is not interative.


[View source]
def quittable? : Bool #

Tests if rendering is quittable.

If true, rendering can be quitted on each overwriting's confirmation.


[View source]
def quitted? : Bool #

Tests if rendering has been quitted.


[View source]
def render #

Starts rendering.


[View source]