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 #

[View source]
def self.on_by_default? : Bool #

[View source]
def self.purpose : String #

[View source]

Instance Method Detail

abstract def append_echo(engine, form : Form) #

Enquotes and appends form to the standard output stream.


[View source]
abstract def bye(engine, code : Decimal) #

Ends the program with the given exit code.


[View source]
def inject(into target : Block) #
Description copied from module Novika::ICapability

Injects the vocabulary of this capability into the target block.


[View source]
abstract def monotonic(engine) : Decimal #

Returns a reading from the monotonic clock, in milliseconds.


[View source]
abstract def nap(engine, millis : Decimal) #

Sleeps for the given amount of milliseconds.


[View source]
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.


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

Extended (contextful) version of #readline.


[View source]
abstract def report_error(engine, error : Error) #

Reports abound an error to the standard error stream.


[View source]