class Slideparts::Commands::New

Public Class Methods

options() click to toggle source
# File lib/slideparts/commands/new.rb, line 9
def options
  {}
end
process(args, options = {}) click to toggle source
# File lib/slideparts/commands/new.rb, line 13
def process(args, options = {})
  raise ArgumentError.new('You must specify a path.') if args.empty?

  new_slide_path = File.expand_path(args.join(" "), Dir.pwd)
  FileUtils.mkdir_p new_slide_path
  FileUtils.cp_r slide_template + '/.', new_slide_path
end
syntax() click to toggle source
# File lib/slideparts/commands/new.rb, line 5
def syntax
  ["new"]
end