abstract class Cosmo::Callable
- Cosmo::Callable
- Reference
- Object
Direct Known Subclasses
Defined in:
cosmo/runtime/types/function.crInstance Method Summary
-
#arity : Range(UInt32, UInt32)
The amount of parameters this function will accept
-
#call(args : Array(ValueType)) : ValueType
Executes the function body, passing in
args
-
#expand_args(args : Array(ValueType)) : Array(ValueType)
Expands any
Spread
s in the argument list -
#intrinsic? : Bool
Whether or not this function is intrinsic
-
#to_s : String
Returns a nicely readable and concise string representation of this object, typically intended for users.
Instance Method Detail
Executes the function body, passing in args
Expands any Spread
s in the argument list
abstract
def to_s : String
#
Description copied from class Object
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
.