Class: QuietQuality::Config::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/quiet_quality/config/builder.rb

Defined Under Namespace

Classes: Updater

Instance Method Summary collapse

Constructor Details

#initialize(parsed_cli_options:) ⇒ Builder

Returns a new instance of Builder.



4
5
6
# File 'lib/quiet_quality/config/builder.rb', line 4

def initialize(parsed_cli_options:)
  @cli = parsed_cli_options
end

Instance Method Details

#optionsObject



8
9
10
11
12
13
14
# File 'lib/quiet_quality/config/builder.rb', line 8

def options
  return @_options if defined?(@_options)
  options = build_initial_options
  Updater.new(options: options, apply: config_file).update! if config_file
  Updater.new(options: options, apply: cli).update!
  @_options = options
end