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



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

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

.arrow_down_smallObject



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

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

.arrow_leftObject



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

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

.arrow_left_rightObject



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

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

.arrow_left_smallObject



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

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

.arrow_lower_leftObject



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

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

.arrow_lower_rightObject



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

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

.arrow_rightObject



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

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

.arrow_right_smallObject



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

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

.arrow_upObject



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

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

.arrow_up_downObject



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

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

.arrow_up_down_smallObject



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

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

.arrow_up_smallObject



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

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

.arrow_upper_leftObject



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

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

.arrow_upper_rightObject



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

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

.bugObject



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

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

.checkmarkObject



22
23
24
# File 'lib/makit/symbols.rb', line 22

def self.checkmark
  "\u2713"
end

.coffeeObject



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

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

.debugObject



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

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

.errorObject



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

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

.fatalObject



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

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

.gearObject



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

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



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/makit/symbols.rb', line 153

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



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

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

.infoObject



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

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

.magnifying_glassObject



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

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

.musicObject



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

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

.questionObject



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

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

.starObject



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

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

.successObject



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

def self.success
  "\u2713"
end

.warnObject



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

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

.warningObject



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

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