gitlab-org--gitlab-foss/app/workers/concerns/cluster_app.rb
2017-11-02 15:31:25 +01:00

11 lines
229 B
Ruby

module ClusterApp
extend ActiveSupport::Concern
included do
def find_app(app_name, id)
Clusters::Cluster::APPLICATIONS[app_name].find(id).try do |app|
yield(app) if block_given?
end
end
end
end