Zuzu::Value::Trait(3)

NAME
Zuzu::Value::Trait - runtime value class for trait values

DESCRIPTION
Represents trait metadata and method definitions used for class composition.

INHERITANCE
Inherits from "Moo::Object".

ROLES
None.

ATTRIBUTES

  name
Type: Str.

Identifier name declared or referenced by the node/value.

  methods
Type: HashRef[InstanceOf["Zuzu::Value::Function"]].

Method table provided by this trait.

  closure_env
Type: Maybe[InstanceOf["Zuzu::Env"]].

Lexical environment captured when the trait is declared.

  source_node
Type: Maybe[InstanceOf["Zuzu::AST::Stmt::Trait"]].

Original trait declaration AST, retained for source extraction.

METHODS

  is_truthy
Returns this runtime value's truthiness in ZuzuScript.

SEE ALSO
Subclasses: none in this distribution.

COPYRIGHT AND LICENCE
Zuzu::Value::Trait is copyright Toby Inkster.

It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.