Skip to content

Commit

Permalink
Mark constants as private (#4110)
Browse files Browse the repository at this point in the history
  • Loading branch information
makenowjust authored and bcardiff committed Mar 17, 2017
1 parent 3333828 commit c2ceee7
Showing 1 changed file with 55 additions and 55 deletions.
110 changes: 55 additions & 55 deletions src/colorize.cr
Original file line number Diff line number Diff line change
Expand Up @@ -102,61 +102,61 @@ class Object
end

struct Colorize::Object(T)
FORE_DEFAULT = "39"
FORE_BLACK = "30"
FORE_RED = "31"
FORE_GREEN = "32"
FORE_YELLOW = "33"
FORE_BLUE = "34"
FORE_MAGENTA = "35"
FORE_CYAN = "36"
FORE_LIGHT_GRAY = "37"
FORE_DARK_GRAY = "90"
FORE_LIGHT_RED = "91"
FORE_LIGHT_GREEN = "92"
FORE_LIGHT_YELLOW = "93"
FORE_LIGHT_BLUE = "94"
FORE_LIGHT_MAGENTA = "95"
FORE_LIGHT_CYAN = "96"
FORE_WHITE = "97"

BACK_DEFAULT = "49"
BACK_BLACK = "40"
BACK_RED = "41"
BACK_GREEN = "42"
BACK_YELLOW = "43"
BACK_BLUE = "44"
BACK_MAGENTA = "45"
BACK_CYAN = "46"
BACK_LIGHT_GRAY = "47"
BACK_DARK_GRAY = "100"
BACK_LIGHT_RED = "101"
BACK_LIGHT_GREEN = "102"
BACK_LIGHT_YELLOW = "103"
BACK_LIGHT_BLUE = "104"
BACK_LIGHT_MAGENTA = "105"
BACK_LIGHT_CYAN = "106"
BACK_WHITE = "107"

MODE_DEFAULT = "0"
MODE_BOLD = "1"
MODE_BRIGHT = "1"
MODE_DIM = "2"
MODE_UNDERLINE = "4"
MODE_BLINK = "5"
MODE_REVERSE = "7"
MODE_HIDDEN = "8"

MODE_BOLD_FLAG = 1
MODE_BRIGHT_FLAG = 1
MODE_DIM_FLAG = 2
MODE_UNDERLINE_FLAG = 4
MODE_BLINK_FLAG = 8
MODE_REVERSE_FLAG = 16
MODE_HIDDEN_FLAG = 32

COLORS = %w(black red green yellow blue magenta cyan light_gray dark_gray light_red light_green light_yellow light_blue light_magenta light_cyan white)
MODES = %w(bold bright dim underline blink reverse hidden)
private FORE_DEFAULT = "39"
private FORE_BLACK = "30"
private FORE_RED = "31"
private FORE_GREEN = "32"
private FORE_YELLOW = "33"
private FORE_BLUE = "34"
private FORE_MAGENTA = "35"
private FORE_CYAN = "36"
private FORE_LIGHT_GRAY = "37"
private FORE_DARK_GRAY = "90"
private FORE_LIGHT_RED = "91"
private FORE_LIGHT_GREEN = "92"
private FORE_LIGHT_YELLOW = "93"
private FORE_LIGHT_BLUE = "94"
private FORE_LIGHT_MAGENTA = "95"
private FORE_LIGHT_CYAN = "96"
private FORE_WHITE = "97"

private BACK_DEFAULT = "49"
private BACK_BLACK = "40"
private BACK_RED = "41"
private BACK_GREEN = "42"
private BACK_YELLOW = "43"
private BACK_BLUE = "44"
private BACK_MAGENTA = "45"
private BACK_CYAN = "46"
private BACK_LIGHT_GRAY = "47"
private BACK_DARK_GRAY = "100"
private BACK_LIGHT_RED = "101"
private BACK_LIGHT_GREEN = "102"
private BACK_LIGHT_YELLOW = "103"
private BACK_LIGHT_BLUE = "104"
private BACK_LIGHT_MAGENTA = "105"
private BACK_LIGHT_CYAN = "106"
private BACK_WHITE = "107"

private MODE_DEFAULT = "0"
private MODE_BOLD = "1"
private MODE_BRIGHT = "1"
private MODE_DIM = "2"
private MODE_UNDERLINE = "4"
private MODE_BLINK = "5"
private MODE_REVERSE = "7"
private MODE_HIDDEN = "8"

private MODE_BOLD_FLAG = 1
private MODE_BRIGHT_FLAG = 1
private MODE_DIM_FLAG = 2
private MODE_UNDERLINE_FLAG = 4
private MODE_BLINK_FLAG = 8
private MODE_REVERSE_FLAG = 16
private MODE_HIDDEN_FLAG = 32

private COLORS = %w(black red green yellow blue magenta cyan light_gray dark_gray light_red light_green light_yellow light_blue light_magenta light_cyan white)
private MODES = %w(bold bright dim underline blink reverse hidden)

def initialize(@object : T)
@fore = FORE_DEFAULT
Expand Down

0 comments on commit c2ceee7

Please sign in to comment.