Class: DeepCover::Analyser::Ruby25LikeBranch
- Inherits:
-
DeepCover::Analyser
- Object
- DeepCover::Analyser
- DeepCover::Analyser::Ruby25LikeBranch
- Includes:
- Subset
- Defined in:
- lib/deep_cover/analyser/ruby25_like_branch.rb
Defined Under Namespace
Classes: NodeCoverageExtrator
Constant Summary collapse
- SUBSET_CLASSES =
[Node::Case, Node::Csend, Node::If, Node::ShortCircuit, Node::Until, Node::UntilPost, Node::While, Node::WhilePost, ].freeze
Instance Attribute Summary
Attributes included from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Ruby25LikeBranch
constructor
A new instance of Ruby25LikeBranch.
- #results ⇒ Object
Methods included from Subset
Methods included from Base
#covered_code, #each_node, #node_children, #node_covered?, #node_runs, #node_runs_map, #node_stat_contributions, #node_stat_type, #stats
Methods included from Tools::Covered
Constructor Details
#initialize(*args) ⇒ Ruby25LikeBranch
Returns a new instance of Ruby25LikeBranch.
15 16 17 18 |
# File 'lib/deep_cover/analyser/ruby25_like_branch.rb', line 15 def initialize(*args) super @loc_index = 0 end |
Class Method Details
.human_name ⇒ Object
7 8 9 |
# File 'lib/deep_cover/analyser/ruby25_like_branch.rb', line 7 def self.human_name 'Ruby25 branches' end |
Instance Method Details
#results ⇒ Object
20 21 22 23 24 25 |
# File 'lib/deep_cover/analyser/ruby25_like_branch.rb', line 20 def results extractor = NodeCoverageExtrator.new each_node.map do |node| extractor.branch_coverage(node) end.to_h end |