Class: CMSScanner::Formatter::Cli
- Inherits:
-
Base
- Object
- Base
- CMSScanner::Formatter::Cli
show all
- Defined in:
- app/formatters/cli.rb
Overview
Instance Attribute Summary
Attributes inherited from Base
#controller_name
Instance Method Summary
collapse
Methods inherited from Base
#base_format, #beautify, #format, #formats, #initialize, #output, #render, #template_vars, #user_interaction?, #view_path, #views_directories
Instance Method Details
#amber(text) ⇒ String
45
46
47
|
# File 'app/formatters/cli.rb', line 45
def amber(text)
colorize(text, 33)
end
|
#blue(text) ⇒ String
51
52
53
|
# File 'app/formatters/cli.rb', line 51
def blue(text)
colorize(text, 34)
end
|
#bold(text) ⇒ String
27
28
29
|
# File 'app/formatters/cli.rb', line 27
def bold(text)
colorize(text, 1)
end
|
#colorize(text, color_code) ⇒ String
58
59
60
|
# File 'app/formatters/cli.rb', line 58
def colorize(text, color_code)
"\e[#{color_code}m#{text}\e[0m"
end
|
#critical_icon ⇒ String
21
22
23
|
# File 'app/formatters/cli.rb', line 21
def critical_icon
red('[!]')
end
|
#green(text) ⇒ String
39
40
41
|
# File 'app/formatters/cli.rb', line 39
def green(text)
colorize(text, 32)
end
|
#info_icon ⇒ String
6
7
8
|
# File 'app/formatters/cli.rb', line 6
def info_icon
green('[+]')
end
|
#notice_icon ⇒ String
11
12
13
|
# File 'app/formatters/cli.rb', line 11
def notice_icon
blue('[i]')
end
|
#red(text) ⇒ String
33
34
35
|
# File 'app/formatters/cli.rb', line 33
def red(text)
colorize(text, 31)
end
|
#warning_icon ⇒ String
16
17
18
|
# File 'app/formatters/cli.rb', line 16
def warning_icon
amber('[!]')
end
|