Class: Covered::Files
Instance Attribute Summary collapse
Attributes inherited from Wrapper
#output
Instance Method Summary
collapse
Methods inherited from Wrapper
#disable, #enable, #expand_path, #relative_path, #to_h
Constructor Details
#initialize(output = nil) ⇒ Files
27
28
29
30
31
|
# File 'lib/covered/files.rb', line 27
def initialize(output = nil)
super(output)
@paths = {}
end
|
Instance Attribute Details
#paths ⇒ Object
Returns the value of attribute paths.
33
34
35
|
# File 'lib/covered/files.rb', line 33
def paths
@paths
end
|
Instance Method Details
#each(&block) ⇒ Object
47
48
49
|
# File 'lib/covered/files.rb', line 47
def each(&block)
@paths.each_value(&block)
end
|
#empty? ⇒ Boolean
35
36
37
|
# File 'lib/covered/files.rb', line 35
def empty?
@paths.empty?
end
|
#mark(path, *args) ⇒ Object
39
40
41
42
43
44
45
|
# File 'lib/covered/files.rb', line 39
def mark(path, *args)
coverage = (@paths[path] ||= Coverage.new(path))
coverage.mark(*args)
return coverage
end
|