Class: FlatironRails
- Inherits:
-
Object
- Object
- FlatironRails
- Defined in:
- lib/flatiron_rails.rb
Constant Summary collapse
- FLATIRON_ROOT =
File.('../', File.dirname(__FILE__))
Class Method Summary collapse
Class Method Details
.run ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/flatiron_rails.rb', line 4 def self.run if ['-v', '--version'].include?(ARGV[0]) puts <<-VERSION.gsub(/^ {6}/, '') Flatiron Rails 1.0.8 VERSION elsif ARGV[0].nil? || ['-h','--help'].include?(ARGV[0]) || ARGV[0] != "new" || ARGV[2] puts <<-HELP.gsub(/^ {6}/, '') Usage: flatiron-rails new <app_name> HELP else system("rails new #{ARGV[1]} -Tm #{FLATIRON_ROOT}/templates/flatiron.rb") end end |