Class: Morecane::EncodingCheck
- Inherits:
-
Struct
- Object
- Struct
- Morecane::EncodingCheck
- Defined in:
- lib/morecane/encoding_check.rb
Overview
Creates violations for ruby files that have no encoding marker in the first two lines
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/encoding_check.rb', line 6 def opts @opts end |
Class Method Details
.options ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/morecane/encoding_check.rb', line 7 def self. { encoding_glob: ['Glob to run encoding checks over', default: '{app,lib,spec}/**/*.rb', variable: 'GLOB', clobber: :no_encoding] } end |
Instance Method Details
#violations ⇒ Object
16 17 18 19 20 |
# File 'lib/morecane/encoding_check.rb', line 16 def violations file_names.map { |file_name| find_violations(file_name) }.flatten.compact end |