Class: GitTopic::Formatter::Branches
- Inherits:
-
Object
- Object
- GitTopic::Formatter::Branches
- Includes:
- Helper, Term::ANSIColor
- Defined in:
- lib/git_topic/formatter/branches.rb
Overview
summarizes branches information
Defined Under Namespace
Classes: Branch
Instance Method Summary collapse
-
#initialize(options) ⇒ Branches
constructor
A new instance of Branches.
- #print ⇒ Object
Methods included from Helper
Constructor Details
#initialize(options) ⇒ Branches
Returns a new instance of Branches.
13 14 15 |
# File 'lib/git_topic/formatter/branches.rb', line 13 def initialize() @all = [:all] end |
Instance Method Details
#print ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/git_topic/formatter/branches.rb', line 18 def print puts "#{bold}[Branches]#{clear}" if @all branches, current_branch = parse_branches parse_length(branches) print_header print_contents(branches, current_branch) end |