class

Lit::Native::Fn

Inherits Lit::Callable / Reference / Object

Constructors

new(name : String, arity : Int32 | Range(Int32, Nil) | Range(Int32, Int32), body : Proc(Interpreter, Array(Value), Token, Value))
Source

Instance methods

arity
Source
call(interpreter, arguments, token) : Value
Source
name
Source
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source