Class: Presto

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

Constant Summary collapse

PRESTO_ROOT =
File.expand_path('../', File.dirname(__FILE__))

Class Method Summary collapse

Class Method Details

.runObject



4
5
6
7
8
9
10
11
12
13
# File 'lib/presto.rb', line 4

def self.run
  if ARGV[0].nil? || ['-h','--help'].include?(ARGV[0]) || ARGV[1]
    puts <<-HELP.gsub(/^ {6}/, '')
    Usage:
      presto <app_name>
    HELP
  else
    system("rails new #{ARGV[0]} -Tm #{PRESTO_ROOT}/templates/flatiron.rb")
  end
end