Class: ResolvedProblemClearer

Inherits:
Object
  • Object
show all
Defined in:
app/interactors/resolved_problem_clearer.rb

Instance Method Summary collapse

Instance Method Details

#executeObject

Clear all problem already resolved


8
9
10
11
12
13
14
15
16
17
# File 'app/interactors/resolved_problem_clearer.rb', line 8

def execute
  nb_problem_resolved.tap { |nb|
    if nb > 0
      criteria.each do |problem|
        ProblemDestroy.new(problem).execute
      end
      repair_database
    end
  }
end