gitlab-org--gitlab-foss/app/services/clusters/applications/update_service.rb
Dylan Griffith a1c216e5e4 Use #public_send instead #method.call
These builder methods are using user provided input inside a public_send
but this is safe to do in this instance because before they are called
we check before calling them that they match an expected application
name.
2019-04-29 22:55:13 -07:00

17 lines
377 B
Ruby

# frozen_string_literal: true
module Clusters
module Applications
class UpdateService < Clusters::Applications::BaseService
private
def worker_class(application)
ClusterPatchAppWorker
end
def builder
cluster.public_send(:"application_#{application_name}") # rubocop:disable GitlabSecurity/PublicSend
end
end
end
end