lib/hexlet/teacher_cli.rb in hexlet-0.1.1 vs lib/hexlet/teacher_cli.rb in hexlet-0.2.0

- old
+ new

@@ -1,6 +1,16 @@ module Hexlet class TeacherCLI < BaseCLI + desc "init LESSON_NAME", "init lesson skeleton" + def init(lesson_name) + folder = "#{lesson_name}_lesson" + FileUtils.mkdir(folder) + template_folder = File.join(File.dirname(__FILE__), "templates", "lesson", ".") + FileUtils.cp_r(template_folder, folder) + + puts (t "lesson_folder_created", folder: folder) + end + desc "submit PATH_TO_LESSON", "submit lesson" def submit(path) lesson_folder = File.split(path)[1] parts = lesson_folder.split("_")