Class: Wf::CaseCommand::RemoveManualAssignment

Inherits:
Object
  • Object
show all
Includes:
SimpleCommand
Defined in:
app/models/wf/case_command/remove_manual_assignment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(wf_case, transition, party) ⇒ RemoveManualAssignment

Returns a new instance of RemoveManualAssignment.



7
8
9
10
11
# File 'app/models/wf/case_command/remove_manual_assignment.rb', line 7

def initialize(wf_case, transition, party)
  @wf_case = wf_case
  @transition = transition
  @party = party
end

Instance Attribute Details

#partyObject (readonly)

Returns the value of attribute party.



6
7
8
# File 'app/models/wf/case_command/remove_manual_assignment.rb', line 6

def party
  @party
end

#transitionObject (readonly)

Returns the value of attribute transition.



6
7
8
# File 'app/models/wf/case_command/remove_manual_assignment.rb', line 6

def transition
  @transition
end

#wf_caseObject (readonly)

Returns the value of attribute wf_case.



6
7
8
# File 'app/models/wf/case_command/remove_manual_assignment.rb', line 6

def wf_case
  @wf_case
end

Instance Method Details

#callObject



13
14
15
# File 'app/models/wf/case_command/remove_manual_assignment.rb', line 13

def call
  wf_case.case_assignments.where(transition: transition, party: party).find_each(&:destroy)
end