Sha256: 734ababa5b9add328348464ecd7351cfcc6fa1784350252536fde87879134ae5
Contents?: true
Size: 794 Bytes
Versions: 17
Compression:
Stored size: 794 Bytes
Contents
# frozen_string_literal: true require 'proxes/request' require 'proxes/policies/request/create_policy' module ProxES class Request class Create < Request attr_reader :index, :type, :id def index=(idx) @index = idx self.path_info = '/' + [index, type, id, endpoint].compact .map { |v| v.is_a?(Array) ? v.join(',') : v } .select { |v| !v.nil? && v != '' }.join('/') end def endpoint '_create' end def parse @index ||= check_part(path_parts[0]) @type ||= check_part(path_parts[1]) @id ||= check_part(path_parts[2]) end def indices? true end end end end
Version data entries
17 entries across 17 versions & 1 rubygems