class Liquid::Filters::Ceil

Overview

ceil Rounds the input up to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied. Input {{ 1.2 | ceil }}

Output 2

Input {{ 2.0 | ceil }}

Output 2

Input {{ 183.357 | ceil }}

Output 184

Here the input value is a string:

Input {{ "3.5" | ceil }}

Output 4

Extended Modules

Defined in:

liquid/filters.cr

Class Method Summary

Class Method Detail

def self.filter(data : Any, args : Array(Any) | Nil = nil) : Any #

[View source]