Class: Wordmove::Logger
- Inherits:
-
Logger
- Object
- Logger
- Wordmove::Logger
- Defined in:
- lib/wordmove/logger.rb
Constant Summary collapse
- MAX_LINE =
70
Instance Method Summary collapse
- #debug(message) ⇒ Object
- #error(message) ⇒ Object
- #task(title) ⇒ Object
- #task_step(local_step, title) ⇒ Object
Instance Method Details
#debug(message) ⇒ Object
25 26 27 |
# File 'lib/wordmove/logger.rb', line 25 def debug() puts " debug".magenta + " | ".black + .to_s end |
#error(message) ⇒ Object
21 22 23 |
# File 'lib/wordmove/logger.rb', line 21 def error() puts " error".red + " | ".black + .to_s end |
#task(title) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/wordmove/logger.rb', line 5 def task(title) prefix = "▬" * 2 title = " ✓ #{title} " padding = "▬" * padding_length(title) puts "\n" + prefix + title.green + padding end |
#task_step(local_step, title) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/wordmove/logger.rb', line 13 def task_step(local_step, title) if local_step puts " local".cyan + " | ".black + title.to_s else puts " remote".yellow + " | ".black + title.to_s end end |