module Pretty

Overview

Pretty.lines formats Array(Array(String)) as table-like text.

Usage

lines = [
  ["user", "maiha"],
  ["password", "123"],
]
puts Pretty.lines(lines, delimiter: " = ")

prints

user     = maiha
password = 123

Defined in:

pretty.cr
pretty/json.cr
pretty/lines.cr

Class Method Summary

Class Method Detail

def self.json(json : String, color : Bool = false) : String #

[View source]
def self.lines(lines : Array(Array(String)), indent : String = "", delimiter : String = "") : String #

[View source]