class Nopoint::Commands::New

Public Class Methods

process(args, options = {}) click to toggle source
# File lib/nopoint/commands/new.rb, line 4
def self.process(args, options = {})
        raise ArgumentError.new('You must specify a name.') if args.empty?

        new_slide_path = File.expand_path(args.join(' '), Dir.pwd)
        FileUtils.mkdir_p new_slide_path
        
        create_sample_files new_slide_path
end

Private Class Methods

create_sample_files(path) click to toggle source
# File lib/nopoint/commands/new.rb, line 15
def self.create_sample_files(path)
        FileUtils.cp_r(self.template + '/.', path)
end
template() click to toggle source
# File lib/nopoint/commands/new.rb, line 19
def self.template
        File.expand_path('../../slideshow_template', File.dirname(__FILE__))
end