struct Crinja::Arguments

Overview

This holds arguments and environment information for function, filter, test and macro calls.

Defined in:

arguments.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(env : Crinja, varargs : Array(Crinja::Value) = [] of Value, kwargs : Hash(String, Crinja::Value) = Hash(String, Value).new, defaults : Hash(String, Crinja::Value) = Variables.new, target : Crinja::Value? = nil) #

[View source]

Instance Method Detail

def [](name : String) : Value #

[View source]
def default(name : Symbol) #

[View source]
def default(name : String) #

[View source]
def defaults : Variables #

Default argument values defined by the call implementation.


[View source]
def env : Crinja #

Returns the crinja environment.


[View source]
def fetch(name, default : Value) #

[View source]
def fetch(name, default = nil) #

[View source]
def fetch(name, &) #

[View source]
def is_set?(name : Symbol) #

[View source]
def is_set?(name : String) #

[View source]
def kwargs : Hash(String, Value) #

Returns the keyword arguments of the call.


[View source]
def target : Value? #

Returns the target of the call (if any).


[View source]
def target! #

[View source]
def to_h #

[View source]
def varargs : Array(Value) #

Returns the variable arguments of the call.


[View source]