Class: MGit::StatusCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/mgit/commands/status.rb

Instance Method Summary collapse

Methods inherited from Command

#check_arity, execute, instance_each, list, load_commands, register_alias, register_command

Methods included from Output

#perror, #pinfo, #ptable, #pwarn

Instance Method Details

#arityObject



11
12
13
# File 'lib/mgit/commands/status.rb', line 11

def arity
  [nil, 0]
end

#descriptionObject



19
20
21
# File 'lib/mgit/commands/status.rb', line 19

def description
  'display status for each repository'
end

#execute(args) ⇒ Object



5
6
7
8
9
# File 'lib/mgit/commands/status.rb', line 5

def execute(args)
  t = []
  Registry.chdir_each { |repo| t << [repo.name, repo.current_branch, decorate_flags(repo)] }
  ptable t, :columns => [24, nil, nil]
end

#usageObject



15
16
17
# File 'lib/mgit/commands/status.rb', line 15

def usage
  'status'
end