Method: BootstrapEmail::Config#load_options

Defined in:
lib/bootstrap-email/config.rb

#load_options(options) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/bootstrap-email/config.rb', line 9

def load_options(options)
  file = File.expand_path('bootstrap-email.config.rb', Dir.pwd)
  if options[:config_path]
    require_relative options[:config_path]
  elsif File.exist?(file)
    require_relative file
  end
  options.each { |name, value| instance_variable_set("@#{name}", value) }
end