module Lolcat
Defined in:
cli.crlolcat.cr
lolcat/action.cr
lolcat/lol.cr
lolcat/options.cr
lolcat/parser.cr
lolcat/version.cr
Constant Summary
-
VERSION =
{{ (`shards version /srv/crystaldoc.info/github-kojix2-lolcat.cr-v0.0.6/src/lolcat`).chomp.stringify }}
Class Method Summary
-
.cat(path : Path, spread : Float64 = 3.0, freq : Float64 = 0.1, offset : Float64 | Nil = nil, invert : Bool = false, force : Bool = false) : Nil
Print a file with rainbow colors
-
.cat(input : String, spread : Float64 = 3.0, freq : Float64 = 0.1, offset : Float64 | Nil = nil, invert : Bool = false, force : Bool = false) : Nil
Print a string with rainbow colors
-
.lol(input, spread : Float64 = 3.0, freq : Float64 = 0.1, offset : Float64 | Nil = nil, invert : Bool = false, &) : Nil
Get a rainbow string line by line
Class Method Detail
def self.cat(path : Path, spread : Float64 = 3.0, freq : Float64 = 0.1, offset : Float64 | Nil = nil, invert : Bool = false, force : Bool = false) : Nil
#
Print a file with rainbow colors
- If offset is not provided, it will be random.
- If force is true, it will force color output even if stdout is not a TTY.
def self.cat(input : String, spread : Float64 = 3.0, freq : Float64 = 0.1, offset : Float64 | Nil = nil, invert : Bool = false, force : Bool = false) : Nil
#
Print a string with rainbow colors
- If offset is not provided, it will be random.
- If force is true, it will force color output even if stdout is not a TTY.
def self.lol(input, spread : Float64 = 3.0, freq : Float64 = 0.1, offset : Float64 | Nil = nil, invert : Bool = false, &) : Nil
#
Get a rainbow string line by line
- If offset is not provided, it will be random.
Example:
Lolcat.lol("Rainbow string", invert: true) do |line|
print line
end