Class: Nopoint::Commands::New

Inherits:
Nopoint::Command show all
Defined in:
lib/nopoint/commands/new.rb

Class Method Summary collapse

Class Method Details

.process(args, options = {}) ⇒ Object

Raises:

  • (ArgumentError)


4
5
6
7
8
9
10
11
# 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