Class: Mapa

Inherits:
Object
  • Object
show all
Defined in:
lib/mapa.rb

Defined Under Namespace

Classes: Utility

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Mapa

Returns a new instance of Mapa.



3
4
5
6
7
8
9
# File 'lib/mapa.rb', line 3

def initialize(args)
  if args.compact.reject{|e|e.empty?}.empty?
    greeting
  else
    @utility = Utility.new(args)
  end
end

Instance Method Details

#greetingObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/mapa.rb', line 11

def greeting
  puts "\nThanks for using Mapa!\n\n"
  puts 'Available Commands'
  puts '  in       Alias for "git init"'
  puts '  ad       Alias for "git add ."'
  puts '  st       Alias for "git status"'
  puts '  cm       Alias for "git commit -m"'
  puts '  br       Alias for "git branch"'
  puts '  pl       Alias for "git pull origin"'
  puts '  ph       Alias for "git push origin"'
  puts '  co       Alias for "git checkout"'
  puts '  cob      Alias for "git checkout -b"'
  puts '  rh       Alias for "git reset --hard"'
  puts '  dif      Alias for "git diff"'
  puts '  fo       Alias for "git fetch origin"'
  puts '  brd      Delete git branches with name matching <pattern> <pattern>'
  puts '  go       Execute "git add ." "git cm -m "<message>" "git push origin <branch>"'
end