Returns a version of the module with custom settings
 @option settings [Boolean] :undefined
   If unassigned params and options should be treated different from nil
 @return [Dry::Initializer]
176225
def [](undefined: true, **)
      null = (undefined == false) ? nil : UNDEFINED
      Module.new.tap do |mod|
        mod.extend DSL
        mod.include self
        mod.send(:instance_variable_set, :@null, null)
      end
    end
1210266
def method_missing(name, *args, **config, &block)
      if respond_to_missing?(name)
        config[:type] = name
        on(*args, config, &block)
      else
        super
      end
    end
55326
def new(*args, version: nil, **options)
      return super(*args, **options) unless versions.any?
      self[version].new(*args, **options)
    end
194752
def app_options
      if ambiguous?
        hash = {}
        @global_options.each_with_index do |option, i|
          hash[i] = option['name'] || option['root']
        end
        hash
      else
        {}
      end
    end
315758
def create_new_spec(class_or_module, dry_run, rails_mode, file_path, spec_path)
      # These names are used in ERB template, don't delete.
      # rubocop:disable Lint/UselessAssignment
      methods_to_generate = class_or_module.method_list.select { |m| m.visibility == :public }
      c = class_or_module
      self_path = to_string_value_to_require(file_path)
      # rubocop:enable Lint/UselessAssignment

      erb = RSpecKickstarter::ERBFactory.new(@full_template).get_instance_for_new_spec(rails_mode, file_path)
      code = erb.result(binding)

      if dry_run
        puts "----- #{spec_path} -----"
        puts code
      else
        if File.exist?(spec_path)
          puts "#{spec_path} already exists."
        else
          FileUtils.mkdir_p(File.dirname(spec_path))
          File.open(spec_path, 'w') { |f| f.write(code) }
          puts "#{spec_path} created."
        end
      end
    end
602261
def getopt ( opt )
      result = { :n => '', :t => '', }
      if opt.length > OPTION_PREFIX_LONG.length then
        if opt[0, OPTION_PREFIX_LONG.length] == OPTION_PREFIX_LONG then
          result[:n] = opt[OPTION_PREFIX_LONG.length, opt.length]
          result[:t] = OPTION_PREFIX_LONG
          return result
        end
      end
      if opt.length > OPTION_PREFIX_SHORT.length then
        if opt[0, OPTION_PREFIX_SHORT.length] == OPTION_PREFIX_SHORT then
          result[:n] = opt[OPTION_PREFIX_SHORT.length, opt.length]
          result[:t] = OPTION_PREFIX_SHORT
          return result 
        end
      end
      return result
    end
60419
function options (userOpts) {
  if (appLoaded && typeof userOpts === 'undefined') {
    return appOptions
  }
  userOpts = typeof userOpts === 'object' ? userOpts : {}
  appOptions = Object.assign({}, defaults, userOpts)
  appOptions.paths = Object.assign({}, defaults.paths, userOpts.paths)
  appLoaded = true

  return appOptions
}
1108282
def default_options(options = {})
      headers = default_headers.merge(options[:headers] || {})
      headers.merge!({USER_AGENT => options[:user_agent]})
      {
        headers: headers,
        ssl: options[:ssl],
        url: options[:endpoint]
      }
    end
116970
def core__get_module_configs module_name
      default_config = core__get_module_default_configs(module_name)
      application_config = core__get_module_application_configs(module_name)
      return default_config unless application_config

      default_config.each do |key, value|
        application_config[key] = value unless application_config[key]
      end

      return application_config
    end
1304308
def method_missing(name, *args, &block)
      if name.to_s[-1] == '='
        config[name[0..-2].to_s.upcase] = args[0]
      else
        config.fetch(name.to_s.upcase) {nil}
      end
    end
758081
def init_config(options={})
      options = options.to_symbol_keys

      if !options[:method]
        abort "Please provide a deployment method. e.g. #{METHODS.keys}"
      end

      @options = DEFAULT_OPTIONS.deep_merge(options)
      write_config
      check_gitignore
    end
706872
function initOptions(options, defaults) {
        options || (options = {});
        if (!defaults) {
            return options;
        }
        for (var i in defaults) {
            if (typeof options[i] === 'undefined') {
                options[i] = defaults[i];
            }
        }
        return options;
    }
419896
function(settings, scope) {
        var
          scopeOptions = angular.extend({}, scope),
          htOptions, i, length;

        settings = settings || {};
        angular.extend(scopeOptions, scope.settings || {});
        htOptions = this.getAvailableSettings();

        for (i = 0, length = htOptions.length; i < length; i++) {
          if (typeof scopeOptions[htOptions[i]] !== 'undefined') {
            settings[htOptions[i]] = scopeOptions[htOptions[i]];
          }
        }

        return settings;
      }
870291
def _initialize(self, settings_module):
        
        #Get the global settings values and assign them as self attributes
        self.settings_list = []
        for setting in dir(global_settings):
            #Only get upper case settings
            if setting == setting.upper():
                setattr(self, setting, getattr(global_settings, setting))
                self.settings_list.append(setting)

        #If a settings module was passed in, import it, and grab settings from it
        #Overwrite global settings with theses
        if settings_module is not None:
            self.SETTINGS_MODULE = settings_module

            #Try to import the settings module
            try:
                mod = import_module(self.SETTINGS_MODULE)
            except ImportError:
                error_message = "Could not import settings at {0}".format(self.SETTINGS_MODULE)
                log.exception(error_message)
                raise ImportError(error_message)

            #Grab uppercased settings as set them as self attrs
            for setting in dir(mod):
                if setting == setting.upper():
                    if setting == "INSTALLED_APPS":
                        self.INSTALLED_APPS += getattr(mod, setting)
                    else:
                        setattr(self, setting, getattr(mod, setting))
                    self.settings_list.append(setting)

        #If PATH_SETTINGS is in the settings file, extend the system path to include it
        if hasattr(self, "PATH_SETTINGS"):
            for path in self.PATH_SETTINGS:
                sys.path.extend(getattr(self,path))

        self.settings_list = list(set(self.settings_list))
519324
def option_defaults
      out = {}
      @specific_options.each do |option|
        option.load_default(out)
      end

      @general_options.each do |_cls, option|
        out.merge! option.class.option_defaults
      end
      out
    end
501840
def get_settings
      warning_opts = get_warning_options
      Trollop::options do
        banner 'LASER: Lexically- and Semantically-Enriched Ruby'
        opt :fix, 'Should errors be fixed in-line?', short: '-f'
        opt :display, 'Should errors be displayed?', short: '-b', default: true
        opt :'report-fixed', 'Should fixed errors be reported anyway?', short: '-r'
        opt :'line-length', 'Warn at the given line length', short: '-l', type: :int
        opt :only, 'Only consider the given warning (by short or full name)', short: '-O', type: :string
        opt :stdin, 'Read Ruby code from standard input', short: '-s'
        opt :'list-modules', 'Print the discovered, loaded modules'
        opt :profile, 'Run the profiler during execution'
        opt :include, 'specify $LOAD_PATH directory (may be used more than once)', short: '-I', multi: true
        opt :S, 'look for scripts using PATH environment variable', short: '-S'
        warning_opts.each { |warning| opt(*warning) }
      end
    end
1102541
def get_export_options(model, options)
      default_options = { only: model.attribute_names.map(&:to_sym),
                          except: [],
                          methods: [],
                          header: true }
      options = default_options.merge(options)
      unless options[:only].is_a?(Array) && options[:except].is_a?(Array) && options[:methods].is_a?(Array)
        raise ArgumentError, 'Exportable: Expecting Array type for field options'
      end
      fields = options[:only] - options[:except] + options[:methods]
      { fields: fields, header: options[:header] }
    end