mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
a9d4acda36
The #initialize method is defined in each context/given/module that needs to add a local. This is an elegant (although possibly confusing) solution.
14 lines
283 B
Crystal
14 lines
283 B
Crystal
module Spectator
|
|
abstract class Example
|
|
getter? finished = false
|
|
|
|
abstract def run : Result
|
|
abstract def description : String
|
|
abstract def group : ExampleGroup
|
|
|
|
def initialize(@locals = {} of Symbol => ValueWrapper)
|
|
end
|
|
|
|
private getter locals
|
|
end
|
|
end
|