Class: Covered::Wrapper
- Inherits:
-
Base
- Object
- Base
- Covered::Wrapper
show all
- Defined in:
- lib/covered/wrapper.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(output = Base.new) ⇒ Wrapper
Returns a new instance of Wrapper.
46
47
48
|
# File 'lib/covered/wrapper.rb', line 46
def initialize(output = Base.new)
@output = output
end
|
Instance Attribute Details
#output ⇒ Object
Returns the value of attribute output.
50
51
52
|
# File 'lib/covered/wrapper.rb', line 50
def output
@output
end
|
Instance Method Details
#accept?(path) ⇒ Boolean
64
65
66
|
# File 'lib/covered/wrapper.rb', line 64
def accept?(path)
@output.accept?(path)
end
|
#add(coverage) ⇒ Object
72
73
74
|
# File 'lib/covered/wrapper.rb', line 72
def add(coverage)
@output.add(coverage)
end
|
#clear ⇒ Object
56
57
58
|
# File 'lib/covered/wrapper.rb', line 56
def clear
@output.clear
end
|
#each {|Coverage| ... } ⇒ Object
77
78
79
|
# File 'lib/covered/wrapper.rb', line 77
def each(&block)
@output.each(&block)
end
|
#expand_path(path) ⇒ Object
85
86
87
|
# File 'lib/covered/wrapper.rb', line 85
def expand_path(path)
@output.expand_path(path)
end
|
#finish ⇒ Object
60
61
62
|
# File 'lib/covered/wrapper.rb', line 60
def finish
@output.finish
end
|
#mark(path, lineno, value) ⇒ Object
68
69
70
|
# File 'lib/covered/wrapper.rb', line 68
def mark(path, lineno, value)
@output.mark(path, lineno, value)
end
|
#relative_path(path) ⇒ Object
81
82
83
|
# File 'lib/covered/wrapper.rb', line 81
def relative_path(path)
@output.relative_path(path)
end
|
#start ⇒ Object
52
53
54
|
# File 'lib/covered/wrapper.rb', line 52
def start
@output.start
end
|
#to_h ⇒ Object
89
90
91
|
# File 'lib/covered/wrapper.rb', line 89
def to_h
to_enum(:each).collect{|coverage| [coverage.path, coverage]}.to_h
end
|