Module: LicenseFinder::Logger
- Defined in:
- lib/license_finder/logger.rb
Defined Under Namespace
Classes: Base, Progress, Quiet, Verbose
Constant Summary
collapse
- Default =
Quiet
Class Method Summary
collapse
Class Method Details
.colorize(color_code, string) ⇒ Object
69
70
71
|
# File 'lib/license_finder/logger.rb', line 69
def self.colorize color_code, string
"\e[#{color_code}m#{string}\e[0m"
end
|
.green(string) ⇒ Object
61
62
63
|
# File 'lib/license_finder/logger.rb', line 61
def self.green string
colorize 32, string
end
|
.new(options = {}) ⇒ Object
3
4
5
6
7
8
9
10
11
12
|
# File 'lib/license_finder/logger.rb', line 3
def self.new options={}
klass = if options[:quiet]
Quiet
elsif options[:debug]
Verbose
else
Progress
end
klass.new
end
|
.red(string) ⇒ Object
65
66
67
|
# File 'lib/license_finder/logger.rb', line 65
def self.red string
colorize 31, string
end
|