lib/google/cloud/dialogflow/v2/contexts/paths.rb in google-cloud-dialogflow-v2-0.5.0 vs lib/google/cloud/dialogflow/v2/contexts/paths.rb in google-cloud-dialogflow-v2-0.5.1
- old
+ new
@@ -45,31 +45,31 @@
# @param environment [String]
# @param user [String]
# @param session [String]
# @param context [String]
#
- # @return [String]
+ # @return [::String]
def context_path **args
resources = {
"context:project:session" => (proc do |project:, session:, context:|
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
- raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
"projects/#{project}/agent/sessions/#{session}/contexts/#{context}"
end),
"context:environment:project:session:user" => (proc do |project:, environment:, user:, session:, context:|
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
- raise ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
- raise ArgumentError, "user cannot contain /" if user.to_s.include? "/"
- raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
+ raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
+ raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
"projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/contexts/#{context}"
end)
}
resource = resources[args.keys.sort.join(":")]
- raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
resource.call(**args)
end
##
# Create a fully-qualified Session resource string.
@@ -90,28 +90,28 @@
# @param project [String]
# @param environment [String]
# @param user [String]
# @param session [String]
#
- # @return [String]
+ # @return [::String]
def session_path **args
resources = {
"project:session" => (proc do |project:, session:|
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
"projects/#{project}/agent/sessions/#{session}"
end),
"environment:project:session:user" => (proc do |project:, environment:, user:, session:|
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
- raise ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
- raise ArgumentError, "user cannot contain /" if user.to_s.include? "/"
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
+ raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
+ raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
"projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}"
end)
}
resource = resources[args.keys.sort.join(":")]
- raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
resource.call(**args)
end
extend self
end