class Novika::Capabilities::Impl::System
Defined in:
novika/capabilities/impl/system.crInstance Method Summary
-
#append_echo(engine, form : Form)
Enquotes and appends form to the standard output stream.
-
#bye(engine, code : Decimal)
Ends the program with the given exit code.
-
#monotonic(engine) : Decimal
Returns a reading from the monotonic clock, in milliseconds.
-
#nap(engine, millis : Decimal)
Sleeps for the given amount of milliseconds.
-
#readline(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)
Enquotes and prints prompt to STDOUT.
-
#readline_star(engine, config : PromptConfig) : Tuple(Quote | Nil, Boolean)
Extended (contextful) version of
#readline
. -
#report_error(engine, error : Error)
Reports abound an error to the standard error stream.
Instance methods inherited from class Novika::Capabilities::ISystem
append_echo(engine, form : Form)
append_echo,
bye(engine, code : Decimal)
bye,
inject(into target : Block)
inject,
monotonic(engine) : Decimal
monotonic,
nap(engine, millis : Decimal)
nap,
readline(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)
readline,
readline_star(engine, config : PromptConfig) : Tuple(Quote | Nil, Boolean)
readline_star,
report_error(engine, error : Error)
report_error
Class methods inherited from class Novika::Capabilities::ISystem
id : String
id,
on_by_default? : Bool
on_by_default?,
purpose : String
purpose
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
Instance Method Detail
Enquotes and appends form to the standard output stream.
Ends the program with the given exit code.
Returns a reading from the monotonic clock, in milliseconds.
Sleeps for the given amount of milliseconds.
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.
Extended (contextful) version of #readline
.
Reports abound an error to the standard error stream.