Sha256: 4831f1e17fda819af70bb83b330cc1b10395281307d5a86d2b12e75e636d39e0
Contents?: true
Size: 844 Bytes
Versions: 1
Compression:
Stored size: 844 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 def indices @index || [] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
proxes-0.10.1 | lib/proxes/request/create.rb |