2018-07-16 12:31:01 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-10-13 13:21:23 -04:00
|
|
|
module Clusters
|
2018-10-10 19:15:04 -04:00
|
|
|
class UpdateService
|
|
|
|
attr_reader :current_user, :params
|
|
|
|
|
|
|
|
def initialize(user = nil, params = {})
|
|
|
|
@current_user, @params = user, params.dup
|
|
|
|
end
|
|
|
|
|
2017-10-13 13:21:23 -04:00
|
|
|
def execute(cluster)
|
|
|
|
cluster.update(params)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|