Class: ProblemCheck::Collection

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
app/models/problem_check.rb

Instance Method Summary collapse

Constructor Details

#initialize(checks) ⇒ Collection

Returns a new instance of Collection.



7
8
9
# File 'app/models/problem_check.rb', line 7

def initialize(checks)
  @checks = checks
end

Instance Method Details

#eachObject



11
12
13
# File 'app/models/problem_check.rb', line 11

def each(...)
  checks.each(...)
end

#run_allObject



15
16
17
# File 'app/models/problem_check.rb', line 15

def run_all
  select(&:enabled?).each(&:run)
end