Class: Bullematic::Configuration
- Inherits:
-
Object
- Object
- Bullematic::Configuration
- Defined in:
- lib/bullematic/configuration.rb,
sig/generated/bullematic/configuration.rbs
Constant Summary collapse
- VALID_FIX_STRATEGIES =
%i[includes preload eager_load].freeze
- DEFAULTS =
{ #: Hash[Symbol, untyped] enabled: true, auto_fix: false, target_paths: %w[app/controllers app/models app/services], skip_paths: [], dry_run: true, backup: true, fix_strategy: :includes, logger: nil, debug: false }.freeze
Instance Attribute Summary collapse
- #auto_fix ⇒ Object
- #backup ⇒ Object
- #debug ⇒ Object
- #dry_run ⇒ Object
- #enabled ⇒ Object
-
#fix_strategy ⇒ Object
Returns the value of attribute fix_strategy.
-
#logger ⇒ Logger
: () -> Logger.
- #skip_paths ⇒ Object
- #target_paths ⇒ Object
Instance Method Summary collapse
-
#default_logger ⇒ Logger
: () -> Logger.
-
#initialize ⇒ Configuration
constructor
: () -> void.
Constructor Details
#initialize ⇒ Configuration
: () -> void
49 50 51 |
# File 'lib/bullematic/configuration.rb', line 49 def initialize DEFAULTS.each { |key, value| public_send(:"#{key}=", value.dup) } end |
Instance Attribute Details
#auto_fix ⇒ Object
43 44 45 |
# File 'lib/bullematic/configuration.rb', line 43 def auto_fix @auto_fix end |
#backup ⇒ Object
43 44 45 |
# File 'lib/bullematic/configuration.rb', line 43 def backup @backup end |
#debug ⇒ Object
43 44 45 |
# File 'lib/bullematic/configuration.rb', line 43 def debug @debug end |
#dry_run ⇒ Object
43 44 45 |
# File 'lib/bullematic/configuration.rb', line 43 def dry_run @dry_run end |
#enabled ⇒ Object
43 44 45 |
# File 'lib/bullematic/configuration.rb', line 43 def enabled @enabled end |
#fix_strategy ⇒ Object
Returns the value of attribute fix_strategy.
45 46 47 |
# File 'lib/bullematic/configuration.rb', line 45 def fix_strategy @fix_strategy end |
#logger ⇒ Logger
: () -> Logger
54 55 56 |
# File 'lib/bullematic/configuration.rb', line 54 def logger @logger ||= default_logger end |
#skip_paths ⇒ Object
43 44 45 |
# File 'lib/bullematic/configuration.rb', line 43 def skip_paths @skip_paths end |
#target_paths ⇒ Object
43 44 45 |
# File 'lib/bullematic/configuration.rb', line 43 def target_paths @target_paths end |