Class: Covered::Skip
Instance Attribute Summary collapse
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Attributes inherited from Wrapper
Instance Method Summary collapse
-
#initialize(output, pattern) ⇒ Skip
constructor
A new instance of Skip.
-
#match?(path) ⇒ Boolean
This is better as it doesn’t allocate a MatchData instance which is essentially useless.
Methods inherited from Filter
Methods inherited from Wrapper
#accept?, #add, #clear, #each, #expand_path, #finish, #mark, #relative_path, #start, #to_h
Methods inherited from Base
#accept?, #add, #clear, #each, #expand_path, #finish, #mark, #relative_path, #start
Constructor Details
#initialize(output, pattern) ⇒ Skip
Returns a new instance of Skip.
94 95 96 97 98 |
# File 'lib/covered/files.rb', line 94 def initialize(output, pattern) super(output) @pattern = pattern end |
Instance Attribute Details
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
100 101 102 |
# File 'lib/covered/files.rb', line 100 def pattern @pattern end |
Instance Method Details
#match?(path) ⇒ Boolean
This is better as it doesn’t allocate a MatchData instance which is essentially useless.
104 105 106 |
# File 'lib/covered/files.rb', line 104 def match? path !@pattern.match?(path) end |