class DeepCover::Node::ShortCircuit
Public Instance Methods
branches()
click to toggle source
# File lib/deep_cover/node/short_circuit.rb, line 14 def branches [ conditional, TrivialBranch.new(condition: lhs, other_branch: conditional), ] end
branches_summary(of_branches)
click to toggle source
# File lib/deep_cover/node/short_circuit.rb, line 21 def branches_summary(of_branches) of_branches.map do |jump| if jump == conditional 'right-hand side' else "#{type == :and ? 'falsy' : 'truthy'} shortcut" end end.join(' and ') end
operator()
click to toggle source
# File lib/deep_cover/node/short_circuit.rb, line 31 def operator loc_hash[:operator].source.to_sym end