abstract class Novika::Capabilities::ISystem

Included Modules

Extended Modules

Direct Known Subclasses

Defined in:

novika/capabilities/system.cr

Class Method Summary

Instance Method Summary

Instance methods inherited from module Novika::ICapability

capabilities : CapabilityCollection capabilities, inject(into target : Block) inject

Constructor methods inherited from module Novika::ICapability

new(capabilities) new

Class Method Detail

def self.id : String #

def self.on_by_default? : Bool #

def self.purpose : String #

Instance Method Detail

abstract def append_echo(engine, form : Form) #

Enquotes and appends form to the standard output stream.


abstract def bye(engine, code : Decimal) #

Ends the program with the given exit code.


def inject(into target : Block) #
Description copied from module Novika::ICapability

Injects the vocabulary of this capability into the target block.


abstract def monotonic(engine) : Decimal #

Returns a reading from the monotonic clock, in milliseconds.


abstract def nap(engine, millis : Decimal) #

Sleeps for the given amount of milliseconds.


abstract def readline(engine, prompt : Form) : Tuple(Quote | Nil, Boolean) #

Enquotes and prints prompt to STDOUT. Waits for the user to answer, enquotes the answer (if any) and returns it together with a status boolean.

If the user answered with EOF (e.g. CTRL-D), status bool is false and answer quote is nil. Else, answer quote contains the answer and status bool is true.


abstract def readline_star(engine, config : PromptConfig) : Tuple(Quote | Nil, Boolean) #

Extended (contextful) version of #readline.


abstract def report_error(engine, error : Error) #

Reports abound an error to the standard error stream.