Class: MGit::TagsCommand

Inherits:
Command show all
Defined in:
lib/mgit/commands/tags.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/tags.rb', line 11

def arity
  [0, 0]
end

#descriptionObject



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

def description
  'display the latest tag in repository (master branch)'
end

#execute(args) ⇒ Object



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

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

#usageObject



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

def usage
  'tags'
end