Class: Wf::CaseCommand::RemoveManualAssignment
- Inherits:
-
Object
- Object
- Wf::CaseCommand::RemoveManualAssignment
- Includes:
- SimpleCommand
- Defined in:
- app/models/wf/case_command/remove_manual_assignment.rb
Instance Attribute Summary collapse
-
#party ⇒ Object
readonly
Returns the value of attribute party.
-
#transition ⇒ Object
readonly
Returns the value of attribute transition.
-
#wf_case ⇒ Object
readonly
Returns the value of attribute wf_case.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(wf_case, transition, party) ⇒ RemoveManualAssignment
constructor
A new instance of RemoveManualAssignment.
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
#party ⇒ Object (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 |
#transition ⇒ Object (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_case ⇒ Object (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
#call ⇒ Object
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 |