abstract class Stelios::IO::Interface

Overview

The abstract base class where renderers should derive from.

Direct Known Subclasses

Defined in:

engine/io.cr

Constant Summary

LOCALE_PLACEHOLDER = /%%(\d)/
LOCALE_PLACEHOLDER_FULL = /(%%\d)/
VARIANT_PLACEHOLDER = /%!(\d)\{((?:(?:\w+ \w+\|)*(?:\w+ \w+))?)\}/

Constructors

Instance Method Summary

Instance methods inherited from class Object

to_sban(io : IO)
to_sban(encoder : SBAN::Encoder)
to_sban : Bytes
to_sban

Class methods inherited from class Object

from_sban(string_or_io) from_sban

Constructor Detail

def self.new(locale : Locale::Entry) #

Creates the renderer and passes the locale context to it. Ran when the game is run.


[View source]

Instance Method Detail

abstract def abort #

Run when the game runs into an unhandled exception. The renderer should unload everything here.


[View source]
abstract def diagnostic : String #

Additional expanded debug info, if relevant


[View source]
def elapsed #

Microseconds since the renderer was created.


[View source]
abstract def identifier : String #

Provide a short identifing string about the type of renderer being run.


[View source]
abstract def output(badge : Badge) #

Provides a Badge for the renderer to output to the user. What do actually do with it is up to the renderer.


[View source]