lib/google/cloud/dialogflow/v2/intents/paths.rb in google-cloud-dialogflow-v2-0.5.0 vs lib/google/cloud/dialogflow/v2/intents/paths.rb in google-cloud-dialogflow-v2-0.5.1

- old
+ new

@@ -31,11 +31,11 @@ # # `projects/{project}/agent` # # @param project [String] # - # @return [String] + # @return [::String] def agent_path project: "projects/#{project}/agent" end ## @@ -59,31 +59,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 Intent resource string. @@ -93,12 +93,12 @@ # `projects/{project}/agent/intents/{intent}` # # @param project [String] # @param intent [String] # - # @return [String] + # @return [::String] def intent_path project:, intent: - raise ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/agent/intents/#{intent}" end extend self