Class: GherkinLint::RequiredTagsStartsWith

Inherits:
Linter
  • Object
show all
Includes:
TagConstraint
Defined in:
lib/gherkin_lint/linter/required_tags_starts_with.rb

Overview

service class to lint for tags used multiple times

Instance Attribute Summary

Attributes inherited from Linter

#issues

Instance Method Summary collapse

Methods included from TagConstraint

#lint, #matcher, #tags, #validate_input

Methods inherited from Linter

#add_error, #add_warning, #backgrounds, descendants, #elements, #features, #files, #filled_scenarios, #filter_tag, #initialize, #line, #lint, #lint_files, #name, #reference, #render_step, #render_step_argument, #scenarios, #steps, #suppress, #suppress_tags, #tag?

Constructor Details

This class inherits a constructor from GherkinLint::Linter

Instance Method Details

#match_pattern?(target) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
14
# File 'lib/gherkin_lint/linter/required_tags_starts_with.rb', line 9

def match_pattern?(target)
  target.each do |t|
    return true if t.delete!('@').start_with?(*@pattern)
  end
  false
end