class Marten::Template::Filter::Default

Overview

The "default" filter.

The "default" filter allows to fallback to a specific value if the left side of the filter expression is not truthy. A filter argument is mandatory. It should be noted that empty strings are considered and will be returned by this filter.

Defined in:

marten/template/filter/default.cr

Instance Method Summary

Instance methods inherited from class Marten::Template::Filter::Base

apply(value : Value, arg : Value | Nil = nil) : Value apply

Instance Method Detail

def apply(value : Value, arg : Value | Nil = nil) : Value #

[View source]