Class: Grover::OptionsBuilder

Inherits:
Hash show all
Defined in:
lib/grover/options_builder.rb

Overview

Build options from Grover.configuration, meta_options, and passed-in options

Instance Method Summary collapse

Methods inherited from Hash

#deep_dup

Constructor Details

#initialize(options, url) ⇒ OptionsBuilder

rubocop:disable Lint/MissingSuper


11
12
13
14
15
16
17
18
# File 'lib/grover/options_builder.rb', line 11

def initialize(options, url) # rubocop:disable Lint/MissingSuper
  @url = url
  combined = grover_configuration
  Utils.deep_merge! combined, Utils.deep_stringify_keys(options)
  Utils.deep_merge! combined, meta_options unless url_source?

  update OptionsFixer.new(combined).run
end