struct Colorize::Object(T)

Defined in:

colorize.cr

Constant Summary

COLORS = ["default", "black", "red", "green", "yellow", "blue", "magenta", "cyan", "light_gray", "dark_gray", "light_red", "light_green", "light_yellow", "light_blue", "light_magenta", "light_cyan", "white"] of ::String
MODE_BLINK = '5'
MODE_BLINK_FLAG = 8
MODE_BOLD = '1'
MODE_BOLD_FLAG = 1
MODE_BRIGHT = '1'
MODE_BRIGHT_FLAG = 1
MODE_DEFAULT = '0'
MODE_DIM = '2'
MODE_DIM_FLAG = 2
MODE_HIDDEN = '8'
MODE_HIDDEN_FLAG = 32
MODE_REVERSE = '7'
MODE_REVERSE_FLAG = 16
MODE_UNDERLINE = '4'
MODE_UNDERLINE_FLAG = 4
MODES = ["bold", "bright", "dim", "underline", "blink", "reverse", "hidden"] of ::String

Constructors

Instance Method Summary

Instance methods inherited from struct Struct

==(other) : Bool ==, hash(hasher) hash, inspect(io : IO) : Nil inspect, pretty_print(pp) : Nil pretty_print, to_s(io) to_s

Instance methods inherited from struct Value

==(other : JSON::Any)
==(other : YAML::Any)
==(other)
==
, dup dup

Instance methods inherited from class Object

!=(other) !=, !~(other) !~, ==(other) ==, ===(other : JSON::Any)
===(other : YAML::Any)
===(other)
===
, =~(other) =~, class class, dup dup, hash(hasher)
hash
hash
, inspect(io : IO)
inspect
inspect
, itself itself, not_nil! not_nil!, pretty_inspect(width = 79, newline = "\n", indent = 0) : String pretty_inspect, pretty_print(pp : PrettyPrint) : Nil pretty_print, tap(&block) tap, to_json(io : IO)
to_json
to_json
, to_pretty_json(indent : String = " ")
to_pretty_json(io : IO, indent : String = " ")
to_pretty_json
, to_s
to_s(io : IO)
to_s
, to_yaml(io : IO)
to_yaml
to_yaml
, try(&block) try, unsafe_as(type : T.class) forall T unsafe_as

Constructor methods inherited from class Object

from_json(string_or_io, root : String) : self
from_json(string_or_io) : self
from_json
, from_yaml(string_or_io : String | IO) : self from_yaml

Constructor Detail

def self.new(object : T) #

[View source]

Instance Method Detail

def back(color : Symbol) #

[View source]
def back(back : Color) #

[View source]
def black #

[View source]
def blink #

[View source]
def blue #

[View source]
def bold #

[View source]
def bright #

[View source]
def cyan #

[View source]
def dark_gray #

[View source]
def default #

[View source]
def dim #

[View source]
def fore(color : Symbol) #

[View source]
def fore(fore : Color) #

[View source]
def green #

[View source]
def hidden #

[View source]
def inspect(io) #

[View source]
def light_blue #

[View source]
def light_cyan #

[View source]
def light_gray #

[View source]
def light_green #

[View source]
def light_magenta #

[View source]
def light_red #

[View source]
def light_yellow #

[View source]
def magenta #

[View source]
def mode(mode : Symbol) #

[View source]
def on(color : Symbol) #

[View source]
def on_black #

[View source]
def on_blue #

[View source]
def on_cyan #

[View source]
def on_dark_gray #

[View source]
def on_default #

[View source]
def on_green #

[View source]
def on_light_blue #

[View source]
def on_light_cyan #

[View source]
def on_light_gray #

[View source]
def on_light_green #

[View source]
def on_light_magenta #

[View source]
def on_light_red #

[View source]
def on_light_yellow #

[View source]
def on_magenta #

[View source]
def on_red #

[View source]
def on_white #

[View source]
def on_yellow #

[View source]
def red #

[View source]
def reverse #

[View source]
def surround(io = STDOUT, &block) #

[View source]
def to_s(io) #

[View source]
def toggle(flag) #

[View source]
def underline #

[View source]
def white #

[View source]
def yellow #

[View source]