Class: ChefSpec::Coverage::StringFilter

Inherits:
RegexpFilter show all
Defined in:
lib/chefspec/coverage/filters.rb

Overview

Examples:

Match resources based on a regular expression.

add_filter 'test/bar/zip'

Instance Method Summary collapse

Methods inherited from RegexpFilter

#matches?

Methods inherited from Filter

#matches?

Constructor Details

#initialize(filter) ⇒ StringFilter

Returns a new instance of StringFilter


29
30
31
# File 'lib/chefspec/coverage/filters.rb', line 29

def initialize(filter)
  super(Regexp.new("^#{filter}"))
end