class RapidSchedule::Commands::New
Public Instance Methods
execute!(args, options = {})
click to toggle source
# File lib/commands/new.rb, line 6 def execute!(args, options = {}) template_path = File.expand_path(File.join(__FILE__, '..', '..', 'template')) raise ArgumentError.new("You need to provide a PATH") if args.empty? destination = File.expand_path(args.join(" "), Dir.pwd) FileUtils.mkdir_p(destination) FileUtils.cp_r(Dir[File.join(template_path, '*')], destination) end