Class: Wf::CaseCommand::ClearManualAssignments
- Inherits:
-
Object
- Object
- Wf::CaseCommand::ClearManualAssignments
- Includes:
- SimpleCommand
- Defined in:
- app/models/wf/case_command/clear_manual_assignments.rb
Instance Attribute Summary collapse
-
#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) ⇒ ClearManualAssignments
constructor
A new instance of ClearManualAssignments.
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
#transition ⇒ Object (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_case ⇒ Object (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
#call ⇒ Object
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 |