Sha256: d582a5ecc79539dc25535e1c8e92bae3867a60ce4c79177bffe04b1419af7816

Contents?: true

Size: 440 Bytes

Versions: 3

Compression:

Stored size: 440 Bytes

Contents

module Souls
  class Delete < Thor
    desc "resolver [CLASS_NAME]", "Delete GraphQL Resolver"
    def resolver(class_name)
      singularized_class_name = class_name.singularize.underscore
      file_path = "./app/graphql/resolvers/#{singularized_class_name}_search.rb"
      FileUtils.rm(file_path)
      puts(Paint % ["Deleted file! : %{white_text}", :yellow, { white_text: [file_path.to_s, :white] }])
      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/resolver.rb
souls-1.8.5 lib/souls/cli/delete/resolver.rb
souls-1.8.4 lib/souls/cli/delete/resolver.rb