Class: Metro::Thor

Inherits:
Thor
  • Object
show all
Defined in:
lib/commands/thor.rb

Instance Method Summary collapse

Instance Method Details

#g(type, name) ⇒ Object



66
67
68
# File 'lib/commands/thor.rb', line 66

def g(type,name)
  generate(type,name)
end

#generate(type, name) ⇒ Object



59
60
61
62
# File 'lib/commands/thor.rb', line 59

def generate(type,name)
  gen = generator(type)
  gen.start [ name ]
end

#helpObject



71
72
73
74
# File 'lib/commands/thor.rb', line 71

def help
  say banner
  print_table self.class.printable_tasks, indent: 4
end

#new(game_name) ⇒ Object



53
54
55
# File 'lib/commands/thor.rb', line 53

def new(game_name)
  Metro::GenerateGame.start [ game_name ]
end