Class: DeepCover::Coverage::Analysis
- Inherits:
-
Struct
- Object
- Struct
- DeepCover::Coverage::Analysis
- Includes:
- Memoize
- Defined in:
- lib/deep_cover/coverage/analysis.rb
Instance Attribute Summary collapse
-
#covered_codes ⇒ Object
Returns the value of attribute covered_codes.
-
#options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Memoize
Instance Attribute Details
#covered_codes ⇒ Object
Returns the value of attribute covered_codes
5 6 7 |
# File 'lib/deep_cover/coverage/analysis.rb', line 5 def covered_codes @covered_codes end |
#options ⇒ Object
Returns the value of attribute options
5 6 7 |
# File 'lib/deep_cover/coverage/analysis.rb', line 5 def @options end |
Class Method Details
Instance Method Details
#analyser_map ⇒ Object
9 10 11 12 13 |
# File 'lib/deep_cover/coverage/analysis.rb', line 9 def analyser_map covered_codes.map do |covered_code| [covered_code, compute_analysers(covered_code)] end.to_h end |
#overall ⇒ Object
19 20 21 22 23 |
# File 'lib/deep_cover/coverage/analysis.rb', line 19 def overall return 100 if stat_map.empty? node, branch = Tools.merge(*stat_map.values, :+).values_at(:node, :branch) (node + branch).percent_covered end |
#stat_map ⇒ Object
15 16 17 |
# File 'lib/deep_cover/coverage/analysis.rb', line 15 def stat_map analyser_map.transform_values { |a| a.transform_values(&:stats) } end |