Class: Covered::Policy

Inherits:
Wrapper show all
Defined in:
lib/covered/policy.rb

Instance Attribute Summary

Attributes inherited from Wrapper

#output

Instance Method Summary collapse

Methods inherited from Wrapper

#each, #mark, #to_h

Constructor Details

#initializePolicy

Returns a new instance of Policy.



38
39
40
# File 'lib/covered/policy.rb', line 38

def initialize
  super(Files.new)
end

Instance Method Details

#captureObject



71
72
73
# File 'lib/covered/policy.rb', line 71

def capture
  @capture ||= Capture.new(@output)
end

#disableObject



79
80
81
# File 'lib/covered/policy.rb', line 79

def disable
  capture.disable
end

#enableObject



75
76
77
# File 'lib/covered/policy.rb', line 75

def enable
  capture.enable
end

#freezeObject



42
43
44
45
46
47
48
49
# File 'lib/covered/policy.rb', line 42

def freeze
  return if frozen?
  
  capture
  summary
  
  super
end

#include(*args) ⇒ Object



55
56
57
# File 'lib/covered/policy.rb', line 55

def include(*args)
  @output = Include.new(@output, *args)
end

#only(*args) ⇒ Object



63
64
65
# File 'lib/covered/policy.rb', line 63

def only(*args)
  @output = Only.new(@output, *args)
end


87
88
89
# File 'lib/covered/policy.rb', line 87

def print_summary(*args)
  summary.print_partial_summary(*args)
end

#root(*args) ⇒ Object



67
68
69
# File 'lib/covered/policy.rb', line 67

def root(*args)
  @output = Root.new(@output, *args)
end

#skip(*args) ⇒ Object



59
60
61
# File 'lib/covered/policy.rb', line 59

def skip(*args)
  @output = Skip.new(@output, *args)
end

#source(*args) ⇒ Object



51
52
53
# File 'lib/covered/policy.rb', line 51

def source(*args)
  @output = Source.new(@output, *args)
end

#summary(*args) ⇒ Object



83
84
85
# File 'lib/covered/policy.rb', line 83

def summary(*args)
  @summary ||= Summary.new(@output, *args)
end