Mustache

Documentation
Login
Bounty program for improvements to Tcl and certain Tcl packages.


[ Home | Main Table Of Contents | Table Of Contents | Keyword Index ]

NAME

mustache::frame - Mustache - Data frames with fields

Table Of Contents

SYNOPSIS

package require mustache::frame

::mustache frame fromTags spec
::mustache frame bool create obj value
::mustache frame bool new value
::mustache frame float create obj value
::mustache frame float new value
::mustache frame int create obj value
::mustache frame int new value
::mustache frame null create obj ?value?
::mustache frame null new ?value?
::mustache frame scalar create obj value
::mustache frame scalar new value
::mustache frame string create obj value
::mustache frame string new value
::mustache frame string! create obj value
::mustache frame string! new value
::mustache frame sequence create obj value
::mustache frame sequence new value
::mustache frame mapping create obj value
::mustache frame mapping new value
frameCmd type
frameCmd is type
frameCmd has? field
frameCmd field field
frameCmd iter context script
frameCmd iterable?
frameCmd nil?
frameCmd value
frameCmd as type
frameCmd visit ?word...?
{*}word... type frame value
{*}word... sequence start frame
{*}word... sequence exit frame value
{*}word... mapping start frame
{*}word... mapping exit frame value
scalarCmd set value
scalarCmd validate value
mappingCmd set key value
mappingCmd unset key
mappingCmd rename key newkey

DESCRIPTION

Welcome to the Mustache project for Tcl, written by Andreas Kupries.

It provides a set of five related Tcl packages for the parsing and rendering of mustache-style logic-less templates, plus an application for easy command-line access to the functionality.

For availability please read Mustache - How To Get The Sources.

Overview

mustache::context objects make use of data frame objects to hold the values they will hand to the mustache render command while it renders a template.

mustache::frame provides seven TclOO classes for holding scalar values of various types, sequences, and mappings, all suitable for working with the objects provided by the mustache::context package.

Note however that any command prefix supporting the Instance API below will be suitable for working with the same.

This is not necessarily true for custom context objects. Such may have their own API for working with typed values.

Class API

Instance API

Data frames are what the context uses as containers for typed values. It should be noted that it actually does not care about the specific type of a value, only about the behaviour it supports, which can be queried (See the methods nil? and iterable?).

Scalar Instance API

Scalar data frames provide more than just the generic API. These additional methods should only be used after a type check:

Mapping Instance API

Mapping data frames provide more than just the generic API. These additional methods should only be used after a type check:

Bugs, Ideas, Feedback

Both the package(s) and this documentation will undoubtedly contain bugs and other problems. Please report such at Mustache Tracker.

Please also report any ideas you may have for enhancements of either package(s) and/or documentation.

KEYWORDS

data frame, logic-less templates, mustache, templating, typed value, value

COPYRIGHT

Copyright © 2019-2021 Andreas Kupries
Copyright © 2019-2021 Documentation, Andreas Kupries