Myst::Param
Inherits Myst::Node / Reference / Object
A parameter for a method definition. Parameters can take many forms. The simplest parameter is just a name or a pattern. If the parameter is a name, it may be prefixed by a '*' to indicate a splat argument, or a '&' to indicate a block argument.
Additionally, if the parameter is a name, it may be prefixed with a pattern and a match operator, or suffixed with a type restriction and/or guard clause, as shown in the final form.
pattern | '*' name | '&' name | [ pattern '=:' ] name [ ':' type_path ] [ '|' guard ]
Constructors
new(pattern : Myst::Node | Nil = nil, name : Nil | String = nil, restriction : Myst::Node | Nil = nil, guard : Myst::Node | Nil = nil, splat : Bool = false, block : Bool = false)
SourceInstance methods
==(other : self)
Returns true if this reference is the same as other. Invokes same?.
accept_children(visitor)
Sourceblock?
Sourceguard
Sourceguard=(guard : Node | Nil)
Sourceguard?
Sourcehash(hasher)
See Object#hash(hasher)
name
Sourcename?
Sourcepattern
Sourcepattern=(pattern : Node | Nil)
Sourcepattern?
Sourcerestriction
Sourcerestriction=(restriction : Node | Nil)
Sourcerestriction?
Sourcesplat?
Source