Class: MGit::TagsCommand

Inherits:
Command show all
Defined in:
lib/mgit/commands/tags.rb

Instance Method Summary collapse

Methods inherited from Command

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

Methods included from Output

#perror, #pinfo, #psystem, #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(_) ⇒ Object



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

def execute(_)
  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