Class: ConservationGuardian::Detector
- Inherits:
-
Object
- Object
- ConservationGuardian::Detector
- Defined in:
- lib/conservation_guardian/detector.rb
Instance Attribute Summary collapse
-
#budget ⇒ Object
readonly
Returns the value of attribute budget.
-
#profiler ⇒ Object
readonly
Returns the value of attribute profiler.
Instance Method Summary collapse
- #detect ⇒ Object
-
#initialize(budget, profiler) ⇒ Detector
constructor
A new instance of Detector.
Constructor Details
#initialize(budget, profiler) ⇒ Detector
Returns a new instance of Detector.
7 8 9 10 |
# File 'lib/conservation_guardian/detector.rb', line 7 def initialize(budget, profiler) @budget = budget @profiler = profiler end |
Instance Attribute Details
#budget ⇒ Object (readonly)
Returns the value of attribute budget.
5 6 7 |
# File 'lib/conservation_guardian/detector.rb', line 5 def budget @budget end |
#profiler ⇒ Object (readonly)
Returns the value of attribute profiler.
5 6 7 |
# File 'lib/conservation_guardian/detector.rb', line 5 def profiler @profiler end |
Instance Method Details
#detect ⇒ Object
12 13 14 15 16 17 |
# File 'lib/conservation_guardian/detector.rb', line 12 def detect findings = [] findings.concat(detect_over_budget) findings.concat(detect_anomalies) findings end |