Class: Covered::Only
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) ⇒ Only
constructor
A new instance of Only.
Methods inherited from Filter
Methods inherited from Wrapper
#disable, #each, #enable, #mark, #to_h
Constructor Details
#initialize(output, pattern) ⇒ Only
Returns a new instance of Only.
123 124 125 126 127 |
# File 'lib/covered/files.rb', line 123 def initialize(output, pattern) super(output) @pattern = pattern end |
Instance Attribute Details
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
129 130 131 |
# File 'lib/covered/files.rb', line 129 def pattern @pattern end |
Instance Method Details
#accept?(path) ⇒ Boolean
131 132 133 |
# File 'lib/covered/files.rb', line 131 def accept?(path) @pattern === path end |