Class: Deployments::UpdateService

Inherits:
Object
  • Object
show all
Defined in:
app/services/deployments/update_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(deployment, params) ⇒ UpdateService

Returns a new instance of UpdateService.


7
8
9
10
# File 'app/services/deployments/update_service.rb', line 7

def initialize(deployment, params)
  @deployment = deployment
  @params = params
end

Instance Attribute Details

#deploymentObject (readonly)

Returns the value of attribute deployment


5
6
7
# File 'app/services/deployments/update_service.rb', line 5

def deployment
  @deployment
end

#paramsObject (readonly)

Returns the value of attribute params


5
6
7
# File 'app/services/deployments/update_service.rb', line 5

def params
  @params
end

Instance Method Details

#executeObject


12
13
14
# File 'app/services/deployments/update_service.rb', line 12

def execute
  deployment.update_status(params[:status])
end