Module: GitBundle::Console
Constant Summary collapse
- COLORS =
{std: 0, error: 31, attention: 32, prompt: 33, heading: 36}
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
17 18 19 |
# File 'lib/git_bundle/console.rb', line 17 def puts_attention(text) puts colorize(text, COLORS[:attention]) end |
#puts_error(text) ⇒ Object
25 26 27 |
# File 'lib/git_bundle/console.rb', line 25 def puts_error(text) puts colorize(text, COLORS[:error]) end |
#puts_heading(text) ⇒ Object
13 14 15 |
# File 'lib/git_bundle/console.rb', line 13 def puts_heading(text) puts colorize("\n=== #{text}", COLORS[:heading]) end |
#puts_prompt(text) ⇒ Object
21 22 23 |
# File 'lib/git_bundle/console.rb', line 21 def puts_prompt(text) puts colorize(text, COLORS[:prompt]) end |
#puts_repo_heading(repo) ⇒ Object
9 10 11 |
# File 'lib/git_bundle/console.rb', line 9 def puts_repo_heading(repo) puts_heading "#{repo.name} (#{repo.branch})" end |