Class: ProblemCheck::Collection
- Inherits:
-
Object
- Object
- ProblemCheck::Collection
- Includes:
- Enumerable
- Defined in:
- app/models/problem_check.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(checks) ⇒ Collection
constructor
A new instance of Collection.
- #run_all ⇒ Object
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
#each ⇒ Object
11 12 13 |
# File 'app/models/problem_check.rb', line 11 def each(...) checks.each(...) end |
#run_all ⇒ Object
15 16 17 |
# File 'app/models/problem_check.rb', line 15 def run_all select(&:enabled?).each(&:run) end |