Module: GithubActions::Colorizer
- Included in:
- ContainerRunner, Container, JobRunner, Tasks::Details, Tasks::Run, Tasks::RunAll
- Defined in:
- lib/tasks/github_actions/github_actions/colorizer.rb
Overview
helper methods for colorizing output, if the “rainbow” colorizing gem is not installed then it prints the original messages without any colorizing
Instance Method Summary collapse
-
#error(msg) ⇒ Object
print an error.
-
#info(msg) ⇒ Object
print a message.
-
#stage(msg) ⇒ Object
print the progress status.
-
#success(msg) ⇒ Object
print a success message.
-
#warning(msg) ⇒ Object
print a warning.
Instance Method Details
#error(msg) ⇒ Object
print an error
27 28 29 |
# File 'lib/tasks/github_actions/github_actions/colorizer.rb', line 27 def error(msg) print_colored(msg, :red) end |
#info(msg) ⇒ Object
print a message
45 46 47 |
# File 'lib/tasks/github_actions/github_actions/colorizer.rb', line 45 def info(msg) print_colored(msg, :cyan) end |
#stage(msg) ⇒ Object
print the progress status
51 52 53 |
# File 'lib/tasks/github_actions/github_actions/colorizer.rb', line 51 def stage(msg) print_colored(msg, :yellow) end |
#success(msg) ⇒ Object
print a success message
33 34 35 |
# File 'lib/tasks/github_actions/github_actions/colorizer.rb', line 33 def success(msg) print_colored(msg, :green) end |
#warning(msg) ⇒ Object
print a warning
39 40 41 |
# File 'lib/tasks/github_actions/github_actions/colorizer.rb', line 39 def warning(msg) print_colored(msg, :magenta) end |