class Trails::CLI
Public Instance Methods
new(name)
click to toggle source
# File lib/cli.rb, line 100 def new(name) app_destination = File.join(Dir.pwd, name) raise "Directory already exists at #{app_destination}" if Dir.exist?(app_destination) FileUtils.copy_entry(TEMPLATE_PATH, app_destination) Dir.mkdir(File.join(app_destination, "app/models")) Dir.mkdir(File.join(app_destination, "db/migrations")) end
server()
click to toggle source
# File lib/cli.rb, line 85 def server raise "Cannot find Trails App" unless PROJECT_ROOT require_relative "#{PROJECT_ROOT}/config/routes" require_relative '../bin/server' server = TrailsServer.new(options[:port], options[:host]) server.start end
Also aliased as: s