Module: Construi::Console
- Defined in:
- lib/construi/console.rb
Defined Under Namespace
Classes: Logger
Class Method Summary collapse
- .info(msg) ⇒ Object
- .logger(name) ⇒ Object
- .output(from, msg) ⇒ Object
- .progress(msg) ⇒ Object
- .verbose(msg) ⇒ Object
- .warn(msg) ⇒ Object
Class Method Details
.info(msg) ⇒ Object
11 12 13 |
# File 'lib/construi/console.rb', line 11 def self.info(msg) puts msg.green end |
.logger(name) ⇒ Object
30 31 32 |
# File 'lib/construi/console.rb', line 30 def self.logger(name) Logger.new name end |
.output(from, msg) ⇒ Object
24 25 26 27 28 |
# File 'lib/construi/console.rb', line 24 def self.output(from, msg) msg.each_line do |m| puts "#{from.rjust(13)} | ".blue << m end end |
.progress(msg) ⇒ Object
19 20 21 22 |
# File 'lib/construi/console.rb', line 19 def self.progress(msg) puts info msg end |
.verbose(msg) ⇒ Object
15 16 17 |
# File 'lib/construi/console.rb', line 15 def self.verbose(msg) puts msg if Options.enabled?(:verbose) end |
.warn(msg) ⇒ Object
7 8 9 |
# File 'lib/construi/console.rb', line 7 def self.warn(msg) puts msg.yellow end |