Class: MGit::RemoveAllCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/mgit/commands/remove_all.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



7
8
9
# File 'lib/mgit/commands/remove_all.rb', line 7

def arity
  [0, 0]
end

#descriptionObject



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

def description
  'removes all repositories from mgit (resets mgit\'s store)'
end

#execute(_) ⇒ Object



3
4
5
# File 'lib/mgit/commands/remove_all.rb', line 3

def execute(_)
  Registry.clean if agree('This will delete all repositories from mgit. Are you sure?'.red)
end

#usageObject



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

def usage
  'removeall'
end