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.32.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.31.0.pre.pre.3 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.31.0.pre.pre.2 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.31.0.pre.pre.1 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.30.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.29.0.pre.pre.2 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.29.0.pre.pre.1 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.27.0.pre.pre.2 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.27.0.pre.pre.1 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.26.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.25.0.pre.pre.1 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.24.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.23.0.pre.pre.1 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.22.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.21.0.pre.pre.2 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.21.0.pre.pre.1 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.20.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.19.0.pre.pre.5 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.19.0.pre.pre.4 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.18.0 lib/ruby_terraform/commands/clean.rb