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.13.1 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.13.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.12.1 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.12.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.11.2 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.11.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.10.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.9.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.8.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.7.0 lib/ruby_terraform/commands/clean.rb