Sha256: c41cdc1c46c73a8081572eec40b5f2ff998af434228e240f4929f8b768ba7ad0

Contents?: true

Size: 631 Bytes

Versions: 3

Compression:

Stored size: 631 Bytes

Contents

module Souls
  class Delete < Thor
    desc "edge_rbs [CLASS_NAME]", "Delete GraphQL Edge RBS"
    def edge_rbs(class_name)
      file_path = ""
      Dir.chdir(Souls.get_mother_path.to_s) do
        file_dir = "./sig/api/app/graphql/types/edges/"
        FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
        singularized_class_name = class_name.underscore.singularize
        file_path = "#{file_dir}#{singularized_class_name}_edge.rbs"
        FileUtils.rm(file_path)
        puts(Paint % ["Delete file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
      end
      file_path
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
souls-1.8.6 lib/souls/cli/delete/edge_rbs.rb
souls-1.8.5 lib/souls/cli/delete/edge_rbs.rb
souls-1.8.4 lib/souls/cli/delete/edge_rbs.rb