Sha256: aaa1fded88148fa01c155c1bbafd1670056930caf64dd3ba99f060c8f9c4ea3d

Contents?: true

Size: 506 Bytes

Versions: 13

Compression:

Stored size: 506 Bytes

Contents

module DeepCover
  class Analyser::Node < Analyser
    def is_raise?(node)
      node.is_a?(Node::Send) && (node.message == :raise || node.message == :exit)
    end

    def is_default_argument?(node)
      node.parent.is_a?(Node::Optarg)
    end

    def is_case_implicit_else?(node)
      parent = node.parent
      node.is_a?(Node::EmptyBody) && parent.is_a?(Node::Case) && !parent.has_else?
    end

    protected
    def convert(node, **)
      Analyser::CoveredCodeSource.new(node)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
deep-cover-0.1.14 lib/deep_cover/analyser/node.rb
deep-cover-0.1.13 lib/deep_cover/analyser/node.rb
deep-cover-0.1.12 lib/deep_cover/analyser/node.rb
deep-cover-0.1.11 lib/deep_cover/analyser/node.rb
deep-cover-0.1.10 lib/deep_cover/analyser/node.rb
deep-cover-0.1.9 lib/deep_cover/analyser/node.rb
deep-cover-0.1.8 lib/deep_cover/analyser/node.rb
deep-cover-0.1.7 lib/deep_cover/analyser/node.rb
deep-cover-0.1.6 lib/deep_cover/analyser/node.rb
deep-cover-0.1.5 lib/deep_cover/analyser/node.rb
deep-cover-0.1.4 lib/deep_cover/analyser/node.rb
deep-cover-0.1.3 lib/deep_cover/analyser/node.rb
deep-cover-0.1.2 lib/deep_cover/analyser/node.rb