Class: Hone::FindingFilter
- Inherits:
-
Object
- Object
- Hone::FindingFilter
- Defined in:
- lib/hone/finding_filter.rb
Instance Method Summary collapse
- #apply ⇒ Object
-
#initialize(findings, options = {}) ⇒ FindingFilter
constructor
A new instance of FindingFilter.
Constructor Details
#initialize(findings, options = {}) ⇒ FindingFilter
Returns a new instance of FindingFilter.
8 9 10 11 12 13 14 15 16 |
# File 'lib/hone/finding_filter.rb', line 8 def initialize(findings, = {}) @findings = findings @diff = [:diff] @baseline = [:baseline] @hot_only = [:hot_only] @show_cold = [:show_cold] @profile_path = [:profile_path] @top = [:top] end |
Instance Method Details
#apply ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/hone/finding_filter.rb', line 18 def apply filtered = @findings filtered = filter_by_diff(filtered) if @diff filtered = filter_by_baseline(filtered) if @baseline filtered = filter_by_priority(filtered) apply_top_limit(filtered) end |