Module: Zenflow::BranchCommands::Branches

Included in:
Zenflow::BranchCommand
Defined in:
lib/zenflow/helpers/branch_commands/branches.rb

Class Method Summary collapse

Class Method Details

.included(thor) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/zenflow/helpers/branch_commands/branches.rb', line 5

def self.included(thor)
  thor.class_eval do

    desc "branches", "List branches"
    def branches
      Zenflow::Log("Available #{flow} branches:")
      Zenflow::Branch.list(flow).each do |branch|
        Zenflow::Log("* #{branch}", indent: true, color: false)
      end
    end

  end
end