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

Defined in:

runtime/callable.cr:93
runtime/callable.cr:107

Instance Method Summary

Instance Method Detail

abstract def call(arguments : Arguments) #

[View source]
def to_s(io) #

[View source]