Class: Uncov::Report::File::Line

Inherits:
Object
  • Object
show all
Defined in:
lib/uncov/report/file/line.rb

Overview

represents file line coverage in report

Instance Method Summary collapse

Instance Method Details

#covered?Boolean

Returns:

  • (Boolean)


21
22
23
24
25
26
# File 'lib/uncov/report/file/line.rb', line 21

def covered?
  return false if Uncov.configuration.nocov_ignore && self[:nocov]

  (simplecov == true && !nocov) ||
    (Uncov.configuration.nocov_covered && simplecov == false && self[:nocov])
end

#display?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/uncov/report/file/line.rb', line 32

def display?
  trigger? || context
end

#nocovObject



5
6
7
8
9
# File 'lib/uncov/report/file/line.rb', line 5

def nocov
  return false if Uncov.configuration.nocov_ignore

  self[:nocov]
end

#nocov_covered?Boolean

Returns:

  • (Boolean)


15
16
17
18
19
# File 'lib/uncov/report/file/line.rb', line 15

def nocov_covered?
  # :nocov
  Uncov.configuration.nocov_covered && simplecov == true && self[:nocov]
  # :nocov
end

#relevant?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/uncov/report/file/line.rb', line 36

def relevant?
  trigger? || covered?
end

#trigger?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/uncov/report/file/line.rb', line 28

def trigger?
  uncov? || nocov_covered?
end

#uncov?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/uncov/report/file/line.rb', line 11

def uncov?
  simplecov == false && !nocov
end