class Marten::Template::Value

Overview

A template value.

Included Modules

Defined in:

marten/template/value.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(raw : Raw) #

[View source]

Class Method Detail

def self.from(raw) #

[View source]

Instance Method Detail

def <=>(other : Value) #

[View source]
def ==(other : Value) #

[View source]
def ==(other) #
Description copied from class Reference

Returns false (other can only be a Value here).


[View source]
def [](key : String) : Value #

[View source]
def each(&) #
Description copied from module Enumerable(Marten::Template::Value)

Must yield this collection's elements to the block.


[View source]
def empty? #

Returns true if the value is empty.


[View source]
def raw : Array(Marten::Template::Value) | Bool | File | Float32 | Float64 | Hash(Marten::Template::Value, Marten::Template::Value) | Int32 | Int64 | Iterator(Marten::Template::Value) | JSON::Any | JSON::Serializable | Marten::HTTP::UploadedFile | Marten::Handlers::Base | Marten::Schema | Marten::Schema::BoundField | Marten::Schema::Field::Base | Marten::Template::Object | Marten::Template::SafeString | String | Symbol | Time | Time::Span | UUID | Nil #

Returns the raw value associated with the template value.


[View source]
def truthy? #

ReturnsĀ true if the value is truthy (ie. if it is not false, 0, or nil).


[View source]