class

Marten::Template::Object::Enum

Inherits Marten::Template::Object / Marten::Template::CanDefineTemplateAttributes / Reference / Object

Allows to expose enum values in templates contexts.

This class serves as a "wrapper" for a real enum value, containing both its "value" and "name". It enables smooth manipulation of such enum values within a template runtime. Ordinary enum values cannot be used directly in templates because Enum be added to union types, hence why this class is necessary.

Constructors

new(enum_class_name : String, enum_value_names : Array(String), name : String, value : Int64)
Source

Instance methods

==(other : self)

Returns true if this reference is the same as other. Invokes same?.

Source
==(other : ::Enum)
Source
enum_class_name
Source
enum_value_names
Source
name
Source
value
Source