Class: Covered::Skip

Inherits:
Filter show all
Defined in:
lib/covered/files.rb

Instance Attribute Summary collapse

Attributes inherited from Wrapper

#output

Instance Method Summary collapse

Methods inherited from Filter

#each, #mark

Methods inherited from Wrapper

#disable, #each, #enable, #mark, #to_h

Constructor Details

#initialize(output, pattern) ⇒ Skip

Returns a new instance of Skip.



109
110
111
112
113
# File 'lib/covered/files.rb', line 109

def initialize(output, pattern)
  super(output)
  
  @pattern = pattern
end

Instance Attribute Details

#patternObject (readonly)

Returns the value of attribute pattern.



115
116
117
# File 'lib/covered/files.rb', line 115

def pattern
  @pattern
end

Instance Method Details

#accept?(path) ⇒ Boolean

Returns:

  • (Boolean)


117
118
119
# File 'lib/covered/files.rb', line 117

def accept? path
  !(@pattern === path)
end