module Marten::Template::Object
Overview
Allows to add support for custom classes to template contexts.
Including this module in a class will make it "compatible" with the template engine so that instances of this class can be included in context objects.
Direct including types
- Marten::Core::Validation::ErrorSet
- Marten::DB::Field::File::File
- Marten::HTTP::FlashStore
- Marten::Schema
- Marten::Schema::BoundField
- Marten::Template::Object::Auto
Defined in:
marten/template/object.crmarten/template/object/auto.cr
Macro Summary
-
template_attributes(*names)
Allows to explicitly configure which methods are made available to the template engine.
Macro Detail
macro template_attributes(*names)
#
Allows to explicitly configure which methods are made available to the template engine.
Only public mehtods that don't require arguments should be made available to templates.