Sha256: d7837ed177b6956608b1f8ece80a881dfeb799d17e8d11e63d209099a18be97d
Contents?: true
Size: 755 Bytes
Versions: 120
Compression:
Stored size: 755 Bytes
Contents
module Souls class Delete < Thor desc "job_rbs [CLASS_NAME]", "Delete SOULs Job Mutation RBS Template" def job_rbs(class_name) file_path = "" worker_name = FileUtils.pwd.split("/").last Dir.chdir(Souls.get_mother_path.to_s) do singularized_class_name = class_name.underscore.singularize file_dir = "./sig/#{worker_name}/app/graphql/mutations/" FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir) file_path = "#{file_dir}#{singularized_class_name}.rbs" FileUtils.rm(file_path) puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }]) end file_path rescue Thor::Error => e raise(Thor::Error, e) end end end
Version data entries
120 entries across 120 versions & 1 rubygems