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.
52
53
54
|
# File 'lib/covered/wrapper.rb', line 52
def initialize(output = Base.new)
@output = output
end
|
Instance Attribute Details
#output ⇒ Object
Returns the value of attribute output.
56
57
58
|
# File 'lib/covered/wrapper.rb', line 56
def output
@output
end
|
Instance Method Details
#accept?(path) ⇒ Boolean
70
71
72
|
# File 'lib/covered/wrapper.rb', line 70
def accept?(path)
@output.accept?(path)
end
|
#disable ⇒ Object
62
63
64
|
# File 'lib/covered/wrapper.rb', line 62
def disable
@output.disable
end
|
#each {|Coverage| ... } ⇒ Object
79
80
81
|
# File 'lib/covered/wrapper.rb', line 79
def each(&block)
@output.each(&block)
end
|
#enable ⇒ Object
58
59
60
|
# File 'lib/covered/wrapper.rb', line 58
def enable
@output.enable
end
|
#expand_path(path) ⇒ Object
87
88
89
|
# File 'lib/covered/wrapper.rb', line 87
def expand_path(path)
@output.expand_path(path)
end
|
#flush ⇒ Object
66
67
68
|
# File 'lib/covered/wrapper.rb', line 66
def flush
@output.flush
end
|
#mark(path, lineno, value) ⇒ Object
74
75
76
|
# File 'lib/covered/wrapper.rb', line 74
def mark(path, lineno, value)
@output.mark(path, lineno, value)
end
|
#relative_path(path) ⇒ Object
83
84
85
|
# File 'lib/covered/wrapper.rb', line 83
def relative_path(path)
@output.relative_path(path)
end
|
#to_h ⇒ Object
91
92
93
|
# File 'lib/covered/wrapper.rb', line 91
def to_h
@output.to_enum(:each).collect{|coverage| [coverage.path, coverage]}.to_h
end
|