Class: Kamaze::Project::Tools::Rubocop::Config
- Defined in:
- lib/kamaze/project/tools/rubocop/config.rb
Overview
Config used during prepare method
Config is defined by options
and patterns
Instance Attribute Summary collapse
-
#options ⇒ Array
Command options.
-
#patterns ⇒ Array
Patterns used to match files.
Instance Method Summary collapse
-
#match_patterns(patterns) ⇒ Array<String>
protected
Match against given patterns.
- #to_a ⇒ Array<String>
Instance Attribute Details
#options ⇒ Array
Command options
25 26 27 |
# File 'lib/kamaze/project/tools/rubocop/config.rb', line 25 def end |
#patterns ⇒ Array
Patterns used to match files
19 20 21 |
# File 'lib/kamaze/project/tools/rubocop/config.rb', line 19 def patterns @patterns end |
Instance Method Details
#match_patterns(patterns) ⇒ Array<String> (protected)
Match against given patterns
38 39 40 |
# File 'lib/kamaze/project/tools/rubocop/config.rb', line 38 def match_patterns(patterns) Dir.glob(patterns) end |
#to_a ⇒ Array<String>
28 29 30 |
# File 'lib/kamaze/project/tools/rubocop/config.rb', line 28 def to_a self..to_a.clone.concat(['--']).concat(match_patterns(patterns)) end |