Sha256: 640191a0e8c89a172f0a99eaadd466b089c5307cfc655223fb4f0d7d13024b8b

Contents?: true

Size: 334 Bytes

Versions: 7

Compression:

Stored size: 334 Bytes

Contents

require 'fileutils'

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

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ruby-terraform-0.6.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.5.1 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.5.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.4.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.3.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.2.0 lib/ruby_terraform/commands/clean.rb
ruby-terraform-0.1.0 lib/ruby_terraform/commands/clean.rb