Class: CMSScanner::Formatter::Cli
- Inherits:
-
Base
- Object
- Base
- CMSScanner::Formatter::Cli
show all
- Defined in:
- app/formatters/cli.rb
Overview
Constant Summary
Constants inherited
from Base
Base::ERB_SUPPORTS_KVARGS
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
47
48
49
|
# File 'app/formatters/cli.rb', line 47
def amber(text)
colorize(text, 33)
end
|
#blue(text) ⇒ String
53
54
55
|
# File 'app/formatters/cli.rb', line 53
def blue(text)
colorize(text, 34)
end
|
#bold(text) ⇒ String
29
30
31
|
# File 'app/formatters/cli.rb', line 29
def bold(text)
colorize(text, 1)
end
|
#colorize(text, color_code) ⇒ String
60
61
62
|
# File 'app/formatters/cli.rb', line 60
def colorize(text, color_code)
"\e[#{color_code}m#{text}\e[0m"
end
|
#critical_icon ⇒ String
23
24
25
|
# File 'app/formatters/cli.rb', line 23
def critical_icon
red('[!]')
end
|
#green(text) ⇒ String
41
42
43
|
# File 'app/formatters/cli.rb', line 41
def green(text)
colorize(text, 32)
end
|
#info_icon ⇒ String
8
9
10
|
# File 'app/formatters/cli.rb', line 8
def info_icon
green('[+]')
end
|
#notice_icon ⇒ String
13
14
15
|
# File 'app/formatters/cli.rb', line 13
def notice_icon
blue('[i]')
end
|
#red(text) ⇒ String
35
36
37
|
# File 'app/formatters/cli.rb', line 35
def red(text)
colorize(text, 31)
end
|
#warning_icon ⇒ String
18
19
20
|
# File 'app/formatters/cli.rb', line 18
def warning_icon
amber('[!]')
end
|