Myst::Def
Inherits Myst::Node / Reference / Object
A method definition. Parameters for methods must be wrapped in
parentheses. If the method does not accept parameters, the parentheses
may be omitted. In the context of a type definition, methods can also be
defined as "static" - or related to the type, rather than instances of the
type - using the alternate keyword defstatic.
For any definition, the return type can be specified as a type restriction
on the method itself using the : Type syntax, similar to the parameters.
[ 'def' | 'defstatic' ] name '(' [ param [ ',' param ]* ] ')' [ ':' return_type ] body 'end' | [ 'def' | 'defstatic' ] name [ ':' return_type ] body 'end'
Constructors
Instance methods
Returns true if this reference is the same as other. Invokes same?.
See Object#hash(hasher)