Class: MGit::StatusCommand
Instance Method Summary
collapse
Methods inherited from Command
create, #help, instance_each, list, register_alias, register_command
Instance Method Details
#description ⇒ Object
19
20
21
|
# File 'lib/mgit/commands/status.rb', line 19
def description
'display status for each repositories'
end
|
#execute(args) ⇒ Object
5
6
7
8
9
10
11
12
13
|
# File 'lib/mgit/commands/status.rb', line 5
def execute(args)
raise TooManyArgumentsError.new(self) if args.size != 0
Registry.chdir_each do |repo|
nc = 36
display = (repo.name.size > nc) ? (repo.name[0..(nc - 3)] + '...') : repo.name.ljust(nc, ' ')
puts "#{display} => [#{flags(repo).to_a.join(', ')}]"
end
end
|
#usage ⇒ Object
15
16
17
|
# File 'lib/mgit/commands/status.rb', line 15
def usage
'status'
end
|