Class: Toolshed::Commands::ListBranches

Inherits:
Object
  • Object
show all
Defined in:
lib/toolshed/commands/list_branches.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.cli_optionsObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/toolshed/commands/list_branches.rb', line 6

def self.cli_options
  {
    banner: 'Usage: list_branches [options]',
    options: {
      repository_name: {
        short_on: '-r',
      },
    }
  }
end

Instance Method Details

#execute(args, options = {}) ⇒ Object



17
18
19
20
21
# File 'lib/toolshed/commands/list_branches.rb', line 17

def execute(args, options = {})
  branch = Toolshed::Git::Branch.new
  branch.list
  Toolshed.die
end