Class: Covered::Only
Instance Attribute Summary collapse
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Attributes inherited from Wrapper
Instance Method Summary collapse
-
#initialize(output, pattern) ⇒ Only
constructor
A new instance of Only.
- #match?(path) ⇒ Boolean
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) ⇒ Only
Returns a new instance of Only.
115 116 117 118 119 |
# File 'lib/covered/files.rb', line 115 def initialize(output, pattern) super(output) @pattern = pattern end |
Instance Attribute Details
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
121 122 123 |
# File 'lib/covered/files.rb', line 121 def pattern @pattern end |
Instance Method Details
#match?(path) ⇒ Boolean
123 124 125 |
# File 'lib/covered/files.rb', line 123 def match?(path) @pattern === path end |