Sha256: 17abcf91243dfb719f6b89b694dd9a1c5b1d34c178f742d21561d3f5520a33da

Contents?: true

Size: 294 Bytes

Versions: 50

Compression:

Stored size: 294 Bytes

Contents

require 'fileutils'

module RubyTerraform
  module Commands
    class Clean
      def initialize(directory: nil)
        @directory = directory ? directory : '.terraform'
      end

      def execute(opts = {})
        FileUtils.rm_rf(opts[:directory] || @directory)
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
ruby-terraform-0.17.0.pre.pre.1 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.16.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.15.1.pre.1 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.15.1.pre2 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.15.1.pre1 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.15.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.14.1.pre1 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.13.2.pre42 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.13.2.pre41 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.13.2.pre40 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.14.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.13.2.pre39 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.13.2.pre38 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.13.2.pre37 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.13.2.pre36 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.13.2.pre35 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.13.2.pre34 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.13.2.pre33 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.13.2.pre32 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.13.2.pre31 lib/ruby_terraform/commands/clean.rb