Packages

A simple Gleam library for pretty printing tabular data!

Current section

Files

Jump to
trellis src trellis@style.erl
Raw

src/trellis@style.erl

-module(trellis@style).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([style/1]).
-export_type([style/0, style_guide/0]).
-type style() :: line | round.
-type style_guide() :: {style_guide,
binary(),
binary(),
binary(),
binary(),
binary(),
binary(),
binary(),
binary(),
binary(),
binary(),
binary()}.
-file("/home/ethanthoma/projects/trellis/src/trellis/style.gleam", 51).
-spec style(style()) -> style_guide().
style(Style) ->
case Style of
line ->
{style_guide,
<<"│"/utf8>>,
<<"─"/utf8>>,
<<"┌"/utf8>>,
<<"┬"/utf8>>,
<<"┐"/utf8>>,
<<"┤"/utf8>>,
<<"├"/utf8>>,
<<"└"/utf8>>,
<<"┴"/utf8>>,
<<"┘"/utf8>>,
<<"┼"/utf8>>};
round ->
{style_guide,
<<"│"/utf8>>,
<<"─"/utf8>>,
<<"╭"/utf8>>,
<<"┬"/utf8>>,
<<"╮"/utf8>>,
<<"┤"/utf8>>,
<<"├"/utf8>>,
<<"╰"/utf8>>,
<<"┴"/utf8>>,
<<"╯"/utf8>>,
<<"┼"/utf8>>}
end.