Class: Covered::Skip
Instance Attribute Summary collapse
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Attributes inherited from Wrapper
Instance Method Summary collapse
- #accept?(path) ⇒ Boolean
-
#initialize(output, pattern, base = "") ⇒ Skip
constructor
A new instance of Skip.
Methods inherited from Filter
Methods inherited from Wrapper
#disable, #each, #enable, #expand_path, #mark, #relative_path, #to_h
Constructor Details
#initialize(output, pattern, base = "") ⇒ Skip
Returns a new instance of Skip.
112 113 114 115 116 117 |
# File 'lib/covered/files.rb', line 112 def initialize(output, pattern, base = "") super(output) @pattern = pattern @base = self.(base) end |
Instance Attribute Details
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
119 120 121 |
# File 'lib/covered/files.rb', line 119 def pattern @pattern end |
Instance Method Details
#accept?(path) ⇒ Boolean
121 122 123 124 125 126 127 |
# File 'lib/covered/files.rb', line 121 def accept? path if @base path = relative_path(path) end !(@pattern === path) end |