Module: RuboCop::Gradual::Configuration
- Defined in:
- lib/rubocop/gradual/configuration.rb
Overview
Configuration class stores Gradual and Rubocop options.
Class Attribute Summary collapse
-
.lint_paths ⇒ Object
readonly
Returns the value of attribute lint_paths.
-
.options ⇒ Object
readonly
Returns the value of attribute options.
-
.rubocop_options ⇒ Object
readonly
Returns the value of attribute rubocop_options.
-
.rubocop_results ⇒ Object
readonly
Returns the value of attribute rubocop_results.
Class Method Summary collapse
- .apply(options = {}, rubocop_options = {}, lint_paths = []) ⇒ Object
- .command ⇒ Object
- .debug? ⇒ Boolean
- .display_time? ⇒ Boolean
- .mode ⇒ Object
- .path ⇒ Object
- .rubocop_config_store ⇒ Object
- .target_file_paths ⇒ Object
Class Attribute Details
.lint_paths ⇒ Object (readonly)
Returns the value of attribute lint_paths.
8 9 10 |
# File 'lib/rubocop/gradual/configuration.rb', line 8 def lint_paths @lint_paths end |
.options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/rubocop/gradual/configuration.rb', line 8 def @options end |
.rubocop_options ⇒ Object (readonly)
Returns the value of attribute rubocop_options.
8 9 10 |
# File 'lib/rubocop/gradual/configuration.rb', line 8 def @rubocop_options end |
.rubocop_results ⇒ Object (readonly)
Returns the value of attribute rubocop_results.
8 9 10 |
# File 'lib/rubocop/gradual/configuration.rb', line 8 def rubocop_results @rubocop_results end |
Class Method Details
.apply(options = {}, rubocop_options = {}, lint_paths = []) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/rubocop/gradual/configuration.rb', line 10 def apply( = {}, = {}, lint_paths = []) @options = @rubocop_options = @lint_paths = lint_paths @target_file_paths = nil @standard_config_store = nil @rubocop_results = [] end |
.command ⇒ Object
23 24 25 |
# File 'lib/rubocop/gradual/configuration.rb', line 23 def command .fetch(:command, :base) end |
.debug? ⇒ Boolean
35 36 37 |
# File 'lib/rubocop/gradual/configuration.rb', line 35 def debug? [:debug] end |
.display_time? ⇒ Boolean
39 40 41 |
# File 'lib/rubocop/gradual/configuration.rb', line 39 def display_time? [:debug] || [:display_time] end |
.mode ⇒ Object
27 28 29 |
# File 'lib/rubocop/gradual/configuration.rb', line 27 def mode .fetch(:mode, :update) end |
.path ⇒ Object
31 32 33 |
# File 'lib/rubocop/gradual/configuration.rb', line 31 def path .fetch(:path, ".rubocop_gradual.lock") end |
.rubocop_config_store ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/rubocop/gradual/configuration.rb', line 43 def rubocop_config_store return standard_config_store if [:standard] RuboCop::ConfigStore.new.tap do |config_store| config_store. = [:config] if [:config] end end |
.target_file_paths ⇒ Object
19 20 21 |
# File 'lib/rubocop/gradual/configuration.rb', line 19 def target_file_paths @target_file_paths ||= rubocop_target_file_paths end |