Sha256: 6aa88a9efbe89189f52702e170550d63d567e985355e21e2f108f2eeb2c527d4

Contents?: true

Size: 550 Bytes

Versions: 4

Compression:

Stored size: 550 Bytes

Contents

require "generator/gene_base"

class Clear < Thor::Group
  include Thor::Actions
  include GeneratorBase::Template
  
  argument :name
  
  def remove_all
    puts "are you sure remove it?(Y or N)"
    clear = STDIN.gets.chomp
    if clear == "Y" || clear == "y"
      if Dir.exist?("#{name}") || File.exist?("#{name}")
        remove_file name
        puts "finish remove to your request! name: #{name}"
      else
        puts "your request file: #{name} is not exist."
      end
    else
      puts "back home without delete it."
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
centuria-0.2.3 lib/centuria/generator/clear.rb
centuria-0.2.2 lib/centuria/generator/clear.rb
centuria-0.2.1 lib/centuria/generator/clear.rb
centuria-0.2.0 lib/centuria/generator/clear.rb