Class: ProblemUpdaterCache

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(problem, notice = nil) ⇒ ProblemUpdaterCache


2
3
4
5
# File 'app/interactors/problem_updater_cache.rb', line 2

def initialize(problem, notice=nil)
  @problem = problem
  @notice = notice
end

Instance Attribute Details

#problemObject (readonly)

Returns the value of attribute problem


6
7
8
# File 'app/interactors/problem_updater_cache.rb', line 6

def problem
  @problem
end

Instance Method Details

#updateProblem

Update cache information about child associate to this problem

update the notices count, and some notice informations


15
16
17
18
19
# File 'app/interactors/problem_updater_cache.rb', line 15

def update
  update_notices_count
  update_notices_cache
  problem
end