Class: Wf::CaseCommand::ClearManualAssignments

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(wf_case, transition) ⇒ ClearManualAssignments

Returns a new instance of ClearManualAssignments.



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

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

Instance Attribute Details

#transitionObject (readonly)

Returns the value of attribute transition.



6
7
8
# File 'app/models/wf/case_command/clear_manual_assignments.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/clear_manual_assignments.rb', line 6

def wf_case
  @wf_case
end

Instance Method Details

#callObject



12
13
14
# File 'app/models/wf/case_command/clear_manual_assignments.rb', line 12

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