Sha256: d0f669058ca97bdd5a85764569910beacf73e84d7581bb8033953b7aa15a0795
Contents?: true
Size: 685 Bytes
Versions: 82
Compression:
Stored size: 685 Bytes
Contents
module Souls class Delete < Thor desc "policy_rbs [CLASS_NAME]", "Delete Policy RBS" def policy_rbs(class_name) file_path = "" Dir.chdir(Souls.get_mother_path.to_s) do file_dir = "./sig/api/app/graphql/policies/" FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir) singularized_class_name = class_name.underscore.singularize file_path = "#{file_dir}#{singularized_class_name}_policy.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
82 entries across 82 versions & 1 rubygems