example_files v1.0.0 ExampleFiles.UI
Provides functions for stdout/stderr output and ANSI escape-sequence formatting.
Summary
Functions
Determines if the UI process automatically displays content provided to
info/2 and error/2. Inspect this property, without changing its value,
using autoflush?/2
Returns true if the UI process automatically displays content provided to
info/2 and error/2. Change this property using autoflush/3
Formats ansi_data with its foreground in blue
Prints ansi_data to the stderr stream, or appends it to the cache if
autoflush?/2 is false. Returns the string printed, or nil
Prints ansi_data to the stderr stream, or inserts it in the cache at the
specified location if autoflush?/2 is false. Returns the string printed,
or nil
Formats ansi_data with its foreground in green
Prints ansi_data to the stdout stream, or appends it to the cache if
autoflush?/2 is false. Returns the string printed, or nil
Prints ansi_data to the stdout stream, or inserts it in the cache at the
specified location if autoflush?/2 is false. Returns the string printed,
or nil
Formats ansi_data with its foreground in red
Starts an ExampleFiles.UI process, linked to the current process, with the
specified autoflush option
Formats ansi_data with underlining
Formats ansi_data with its foreground in yellow
Types
Functions
Determines if the UI process automatically displays content provided to
info/2 and error/2. Inspect this property, without changing its value,
using autoflush?/2.
Examples
iex> {:ok, ui} = ExampleFiles.UI.start_link
...> ui |> ExampleFiles.UI.autoflush(false)
...> ui |> ExampleFiles.UI.autoflush?
false
Returns true if the UI process automatically displays content provided to
info/2 and error/2. Change this property using autoflush/3.
Examples
iex> {:ok, ui} = ExampleFiles.UI.start_link
...> ui |> ExampleFiles.UI.autoflush?
true
Formats ansi_data with its foreground in blue.
error(GenServer.server, IO.ANSI.ansidata, timeout) :: binary
Prints ansi_data to the stderr stream, or appends it to the cache if
autoflush?/2 is false. Returns the string printed, or nil.
error_insert_at(GenServer.server, integer, IO.ANSI.ansidata, timeout) :: binary
Prints ansi_data to the stderr stream, or inserts it in the cache at the
specified location if autoflush?/2 is false. Returns the string printed,
or nil.
Formats ansi_data with its foreground in green.
info(GenServer.server, IO.ANSI.ansidata, timeout) :: binary
Prints ansi_data to the stdout stream, or appends it to the cache if
autoflush?/2 is false. Returns the string printed, or nil.
info_insert_at(GenServer.server, integer, IO.ANSI.ansidata, timeout) :: binary
Prints ansi_data to the stdout stream, or inserts it in the cache at the
specified location if autoflush?/2 is false. Returns the string printed,
or nil.
Formats ansi_data with its foreground in red.
start_link([{:autoflush, boolean}], [{atom, any}]) :: GenServer.on_start
Starts an ExampleFiles.UI process, linked to the current process, with the
specified autoflush option.
Formats ansi_data with underlining.
Formats ansi_data with its foreground in yellow.