Class: Makit::Symbols

Inherits:
Object
  • Object
show all
Defined in:
lib/makit/symbols.rb

Overview

Unicode symbol utilities with colorization

This class provides a collection of Unicode symbols with appropriate colors for use in terminal output. Symbols are provided for various purposes including status indicators, directional arrows, and decorative elements.

Class Method Summary collapse

Class Method Details

.arrow_downObject



99
100
101
# File 'lib/makit/symbols.rb', line 99

def self.arrow_down
  Rainbow("\u2B07").yellow  # Down arrow
end

.arrow_down_smallObject



131
132
133
# File 'lib/makit/symbols.rb', line 131

def self.arrow_down_small
  Rainbow("\u2B07").yellow  # Down arrow
end

.arrow_leftObject



91
92
93
# File 'lib/makit/symbols.rb', line 91

def self.arrow_left
  Rainbow("\u2B05").yellow  # Left arrow
end

.arrow_left_rightObject



107
108
109
# File 'lib/makit/symbols.rb', line 107

def self.arrow_left_right
  Rainbow("\u2194").yellow  # Left/right arrow
end

.arrow_left_smallObject



139
140
141
# File 'lib/makit/symbols.rb', line 139

def self.arrow_left_small
  Rainbow("\u2B05").yellow  # Left arrow
end

.arrow_lower_leftObject



119
120
121
# File 'lib/makit/symbols.rb', line 119

def self.arrow_lower_left
  Rainbow("\u2199").yellow  # South west arrow
end

.arrow_lower_rightObject



115
116
117
# File 'lib/makit/symbols.rb', line 115

def self.arrow_lower_right
  Rainbow("\u2198").yellow  # South east arrow
end

.arrow_rightObject



87
88
89
# File 'lib/makit/symbols.rb', line 87

def self.arrow_right
  Rainbow("\u27A4").yellow  # Arrow pointing rightwards then curving upwards
end

.arrow_right_smallObject



135
136
137
# File 'lib/makit/symbols.rb', line 135

def self.arrow_right_small
  Rainbow("\u27A1").yellow  # Black rightwards arrow
end

.arrow_upObject



95
96
97
# File 'lib/makit/symbols.rb', line 95

def self.arrow_up
  Rainbow("\u2B06").yellow  # Up arrow
end

.arrow_up_downObject



103
104
105
# File 'lib/makit/symbols.rb', line 103

def self.arrow_up_down
  Rainbow("\u2195").yellow  # Up/down arrow
end

.arrow_up_down_smallObject



143
144
145
# File 'lib/makit/symbols.rb', line 143

def self.arrow_up_down_small
  Rainbow("\u2195").yellow  # Up/down arrow
end

.arrow_up_smallObject



127
128
129
# File 'lib/makit/symbols.rb', line 127

def self.arrow_up_small
  Rainbow("\u2B06").yellow  # Up arrow
end

.arrow_upper_leftObject



123
124
125
# File 'lib/makit/symbols.rb', line 123

def self.arrow_upper_left
  Rainbow("\u2196").yellow  # North west arrow
end

.arrow_upper_rightObject



111
112
113
# File 'lib/makit/symbols.rb', line 111

def self.arrow_upper_right
  Rainbow("\u2197").yellow  # North east arrow
end

.bugObject



71
72
73
# File 'lib/makit/symbols.rb', line 71

def self.bug
  Rainbow("\u1F41E").yellow # Bug
end

.checkmarkObject



27
28
29
# File 'lib/makit/symbols.rb', line 27

def self.checkmark
  "\u2713"
end

.coffeeObject



63
64
65
# File 'lib/makit/symbols.rb', line 63

def self.coffee
  Rainbow("\u2615").yellow  # Hot beverage
end

.debugObject



43
44
45
# File 'lib/makit/symbols.rb', line 43

def self.debug
  Rainbow("\u24D8").blue  # Circle with "i"
end

.errorObject



35
36
37
# File 'lib/makit/symbols.rb', line 35

def self.error
  Rainbow("\u0058").red
end

.fatalObject



51
52
53
# File 'lib/makit/symbols.rb', line 51

def self.fatal
  Rainbow("\u25A0").bright.red # Filled square, indicating stop/critical
end

.gearObject



75
76
77
# File 'lib/makit/symbols.rb', line 75

def self.gear
  Rainbow("\u2699").yellow # Gear
end

.get_severity_symbol(severity) ⇒ String

Get appropriate symbol for log severity level

Returns a colored Unicode symbol that matches the given log severity level. Used primarily in log formatting to provide visual indicators.

Parameters:

  • severity (String)

    The severity level (DEBUG, WARN, ERROR, FATAL)

Returns:

  • (String)

    Colored Unicode symbol or space for unrecognized levels



158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/makit/symbols.rb', line 158

def self.get_severity_symbol(severity)
  case severity
  when "DEBUG"
    question
    # when "INFO"
    #  info
  when "WARN"
    warning
  when "ERROR"
    error
  when "FATAL"
    fatal
  else
    " "
  end
end

.heartObject



67
68
69
# File 'lib/makit/symbols.rb', line 67

def self.heart
  Rainbow("\u2764").red # Heavy black heart
end

.infoObject



47
48
49
# File 'lib/makit/symbols.rb', line 47

def self.info
  Rainbow("\u2139").blue  # Information source
end

.magnifying_glassObject



79
80
81
# File 'lib/makit/symbols.rb', line 79

def self.magnifying_glass
  Rainbow("\u1F50D").yellow # Left-pointing magnifying glass
end

.musicObject



147
148
149
# File 'lib/makit/symbols.rb', line 147

def self.music
  Rainbow("\u266B").yellow  # Beamed eighth notes
end

.questionObject



83
84
85
# File 'lib/makit/symbols.rb', line 83

def self.question
  Rainbow("\u003F").yellow  # Question mark
end

.starObject



59
60
61
# File 'lib/makit/symbols.rb', line 59

def self.star
  Rainbow("\u2605").yellow  # Star
end

.successObject



31
32
33
# File 'lib/makit/symbols.rb', line 31

def self.success
  "\u2713"
end

.warnObject



55
56
57
# File 'lib/makit/symbols.rb', line 55

def self.warn
  Rainbow("\u26A0").yellow  # Warning sign
end

.warningObject



39
40
41
# File 'lib/makit/symbols.rb', line 39

def self.warning
  Rainbow("\u26A0").yellow
end