Method: ContentsGenerator#switch

Defined in:
lib/contents_generator.rb

#switchObject



18
19
20
21
22
23
24
# File 'lib/contents_generator.rb', line 18

def switch 
  if @commands.include? @command
    exec("ruby #{CG_LIB}/#{@command}.rb #{@argv.join(' ')}")
  else
    puts OptionParser.new("Usage: cg [#{@commands.join('|')}]").help
  end
end