module Crinja::Callable
Overview
A Callable is a Crinja type object that can be called from an expression call. These include
functions, macros, tests and filters.
It can be implemented by an object or module which inherits from CallableMod
or using a proc.
In either way, the callable must respond to #call(arguments : Arguments)
and return Value
or
a value accepted by Crinja.value
.
It must be added to the environment's feature library to be useable from template.
There are macros in Crinja
which allow an easy implementation as a proc.
Direct including types
- Crinja::Callable::Instance
- Crinja::Tag::For::ForLoop::CycleMethod
- Crinja::Tag::For::ForLoop::Recursive
- Crinja::Tag::Macro::MacroFunction
Defined in:
runtime/callable.cr:93runtime/callable.cr:107