Sha256: fd28f9f62b0a4e567c42990e2978a6e6520b1bdc1019b39be0119609df0d8cc5

Contents?: true

Size: 478 Bytes

Versions: 5

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

require_relative 'base_operation'

module Esse
  module CLI
    class Index::Delete < Index::BaseOperation
      def run
        validate_options!
        indices.each do |index|
          index.elasticsearch.delete_index!(**options)
        end
      end

      private

      def options
        @options.slice(*@options.keys - CLI_IGNORE_OPTS)
      end

      def validate_options!
        validate_indices_option!
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
esse-0.2.2 lib/esse/cli/index/delete.rb
esse-0.2.0 lib/esse/cli/index/delete.rb
esse-0.1.3 lib/esse/cli/index/delete.rb
esse-0.1.2 lib/esse/cli/index/delete.rb
esse-0.1.1 lib/esse/cli/index/delete.rb