Sha256: 8806e214b0aeba92d2d4675328db9c479ff8a0eec90a14e7574b0b3c395389ce

Contents?: true

Size: 663 Bytes

Versions: 13

Compression:

Stored size: 663 Bytes

Contents

# frozen_string_literal: true

require 'proxes/request'
require 'proxes/policies/request/stats_policy'

module ProxES
  class Request
    class Stats < Request
      attr_reader :index

      def index=(idx)
        @index = idx
        self.path_info = '/' + [index, endpoint].compact
                                                .map { |v| v.is_a?(Array) ? v.join(',') : v }
                                                .select { |v| !v.nil? && v != '' }.join('/')
      end

      def endpoint
        '_stats'
      end

      def parse
        @index ||= check_part(path_parts[0])
      end

      def indices?
        true
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
proxes-0.9.4 lib/proxes/request/stats.rb
proxes-0.9.2 lib/proxes/request/stats.rb
proxes-0.9.1 lib/proxes/request/stats.rb
proxes-0.9.0 lib/proxes/request/stats.rb
proxes-0.8.6 lib/proxes/request/stats.rb
proxes-0.8.5 lib/proxes/request/stats.rb
proxes-0.8.4 lib/proxes/request/stats.rb
proxes-0.8.3 lib/proxes/request/stats.rb
proxes-0.8.2 lib/proxes/request/stats.rb
proxes-0.8.1 lib/proxes/request/stats.rb
proxes-0.8.0 lib/proxes/request/stats.rb
proxes-0.7.1 lib/proxes/request/stats.rb
proxes-0.7.0 lib/proxes/request/stats.rb