Class: Morecane::MustNotMatchCheck
- Inherits:
-
Struct
- Object
- Struct
- Morecane::MustNotMatchCheck
- Defined in:
- lib/morecane/must_not_match_check.rb
Overview
Creates violations for ruby files that match a given regexp
Instance Attribute Summary collapse
-
#opts ⇒ Object
Returns the value of attribute opts.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#opts ⇒ Object
Returns the value of attribute opts
6 7 8 |
# File 'lib/morecane/must_not_match_check.rb', line 6 def opts @opts end |
Class Method Details
.options ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/morecane/must_not_match_check.rb', line 7 def self. { must_not_match_glob: ['Glob to run no-match checks over', default: '{app,lib,spec}/**/*.rb', variable: 'GLOB', clobber: :no_must_not_nomatch], must_not_match_regexp: ['Regexp to check files against', variable: 'REGEXP', clobber: :no_must_not_match], } end |
Instance Method Details
#violations ⇒ Object
19 20 21 22 23 |
# File 'lib/morecane/must_not_match_check.rb', line 19 def violations file_names.map { |file_name| find_violations(file_name) }.flatten.compact end |