class Coverfield::Source::Method

Represents a method within a class

Attributes

args[R]
body[R]
name[R]
source_class[R]

Public Class Methods

new(method_name, args, body, source_class) click to toggle source

Constructor

# File lib/coverfield/source/method.rb, line 6
       def initialize(method_name, args, body, source_class)
  @name = method_name
  @args = args
  @body = body
  @source_class = source_class
end

Public Instance Methods

nocov?() click to toggle source

Tells whether the method should be covered by a test or not

# File lib/coverfield/source/method.rb, line 15
       def nocov?
  @source_class.source_file.nocov? @body
end