class Crystal::Splat
inherits Crystal::UnaryExpression
¶
Class methods¶
.at
¶
Yields arg, arg_index, object, object_index corresponding
to arguments at a def's splat index, matching the given objects.
If there are more objects than arguments in the method, they are not yielded.
If splat index is nil, all args and objects (with their indices) are yielded.
.before
¶
Yields arg, arg_index, object, object_index corresponding
to arguments before a def's splat index, matching the given objects.
If there are more objects than arguments in the method, they are not yielded.
If splat index is nil, all args and objects (with their indices) are yielded.
.match
¶
Yields arg, arg_index, object, object_index corresponding
to def arguments matching the given objects, taking into account the
def's splat index.
.size(a_def, objects, splat_index = a_def.splat_index)
¶
(a_def, objects, splat_index = a_def.splat_index)
Returns the splat size of this def matching the given objects.
Methods¶
#interpret(method : String, args : Array(ASTNode), named_args : Hash(String, ASTNode)?, block : Crystal::Block?, interpreter : Crystal::MacroInterpreter, name_loc : Location?)
¶
(method : String, args : Array(ASTNode), named_args : Hash(String, ASTNode)?, block : Crystal::Block?, interpreter : Crystal::MacroInterpreter, name_loc : Location?)