Class: Covered::Wrapper
- Inherits:
-
Object
show all
- Includes:
- Enumerable
- Defined in:
- lib/covered/wrapper.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(output = nil) ⇒ Wrapper
Returns a new instance of Wrapper.
25
26
27
|
# File 'lib/covered/wrapper.rb', line 25
def initialize(output = nil)
@output = output
end
|
Instance Attribute Details
#output ⇒ Object
Returns the value of attribute output.
29
30
31
|
# File 'lib/covered/wrapper.rb', line 29
def output
@output
end
|
Instance Method Details
#disable ⇒ Object
39
40
41
|
# File 'lib/covered/wrapper.rb', line 39
def disable
@output.disable if @output
end
|
#each {|Coverage| ... } ⇒ Object
44
45
46
|
# File 'lib/covered/wrapper.rb', line 44
def each(&block)
@output.each(&block)
end
|
#enable ⇒ Object
35
36
37
|
# File 'lib/covered/wrapper.rb', line 35
def enable
@output.enable if @output
end
|
#mark(*args) ⇒ Object
31
32
33
|
# File 'lib/covered/wrapper.rb', line 31
def mark(*args)
@output.mark(*args) if @output
end
|
#to_h ⇒ Object
48
49
50
|
# File 'lib/covered/wrapper.rb', line 48
def to_h
collect{|coverage| [coverage.path, coverage]}.to_h
end
|