View Source Scribe.Border (Scribe v0.11.0)

Defines border and edge symbols for a table cell.

Example Usage

When printed, a cell with a border of Scribe.Border.new("+", "|", "-") would look like:

+--------+
| "test" |
+--------+

Summary

Functions

Defines a new Border.t with given corner and edges.

Types

@type t() :: %Scribe.Border{
  bottom_edge: String.t(),
  bottom_left_corner: String.t(),
  bottom_right_corner: String.t(),
  left_edge: String.t(),
  right_edge: String.t(),
  top_edge: String.t(),
  top_left_corner: String.t(),
  top_right_corner: String.t()
}

Functions

Link to this function

new(corner, v_edge, h_edge)

View Source
@spec new(String.t(), String.t(), String.t()) :: t()

Defines a new Border.t with given corner and edges.

Examples

iex> new("+", "|", "-")
%Scribe.Border{
  top_left_corner: "+",
  top_edge: "-",
  top_right_corner: "+",
  right_edge: "|",
  bottom_right_corner: "+",
  bottom_edge: "-",
  bottom_left_corner: "+",
  left_edge: "|"
}