Module: GitBundle::Console
- Included in:
- CLI, GitBundle::Commands::Generic, GitBundle::Commands::Push
- Defined in:
- lib/git_bundle/console.rb
Constant Summary collapse
- COLORS =
{error: 31, attention: 32, prompt: 33, heading: 34}
Instance Method Summary collapse
- #puts_attention(text) ⇒ Object
- #puts_error(text) ⇒ Object
- #puts_heading(text) ⇒ Object
- #puts_prompt(text) ⇒ Object
- #puts_repo_heading(repo) ⇒ Object
Instance Method Details
#puts_attention(text) ⇒ Object
16 17 18 |
# File 'lib/git_bundle/console.rb', line 16 def puts_attention(text) puts colorize(text, COLORS[:attention]) end |
#puts_error(text) ⇒ Object
24 25 26 |
# File 'lib/git_bundle/console.rb', line 24 def puts_error(text) puts colorize(text, COLORS[:error]) end |
#puts_heading(text) ⇒ Object
12 13 14 |
# File 'lib/git_bundle/console.rb', line 12 def puts_heading(text) puts colorize("\n=== #{text}", COLORS[:heading]) end |
#puts_prompt(text) ⇒ Object
20 21 22 |
# File 'lib/git_bundle/console.rb', line 20 def puts_prompt(text) puts colorize(text, COLORS[:prompt]) end |
#puts_repo_heading(repo) ⇒ Object
8 9 10 |
# File 'lib/git_bundle/console.rb', line 8 def puts_repo_heading(repo) puts colorize("\n=== #{repo.name} (#{repo.branch})", COLORS[:heading], true) end |