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, uri) ⇒ OptionsBuilder

Returns a new instance of OptionsBuilder.



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

def initialize(options, uri)
  super()
  @uri = uri
  combined = grover_configuration
  Utils.deep_merge! combined, Utils.deep_stringify_keys(options)
  Utils.deep_merge! combined, meta_options unless uri_source?

  update OptionsFixer.new(combined).run
end