Class: Covered::Root

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, path) ⇒ Root

Returns a new instance of Root.



137
138
139
140
141
# File 'lib/covered/files.rb', line 137

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

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



143
144
145
# File 'lib/covered/files.rb', line 143

def path
  @path
end

Instance Method Details

#accept?(path) ⇒ Boolean

Returns:

  • (Boolean)


145
146
147
# File 'lib/covered/files.rb', line 145

def accept?(path)
	path.start_with?(@path)
end