Returns the {HamlLint::Configuration} that should be used given the
 specified options.

 @param options [Hash]
 @return [HamlLint::Configuration]
972164
def load_applicable_config(options)
      if options[:config]
        options[:config]
      elsif options[:auto_gen_config]
        HamlLint::ConfigurationLoader.load_applicable_config(
          options[:config_file],
          exclude_files: [HamlLint::ConfigurationLoader::AUTO_GENERATED_FILE]
        )
      else
        HamlLint::ConfigurationLoader.load_applicable_config(options[:config_file])
      end
    end
816871
def parse_dynamic_options
      if no_options_passed?
        {}
      else
        dynamic_parser.parse!(@params)

        data = dynamic_parser.to_hash
        invalid_key = data.find { |key, value| value.nil? }

        if invalid_key
          raise InvalidOptions.new(invalid_key.first)
        end

        data
      end
    end
1332367
def config
      @config ||= begin
        conf = Bolt::Config.new(Bolt::Boltdir.new('.'), {})
        conf.modulepath = [modulepath].flatten
        conf
      end
    end
854249
def options
      map = ChefAPI::Configurable.keys.map do |key|
        [key, instance_variable_get(:"@#{key}")]
      end
      Hash[map]
    end
676857
def tcfg_get(key)
      t_tcfg = tcfg
      unless t_tcfg.key? key
        raise NoSuchConfigurationKeyError, "No configuration defined for '#{key}'"
      end
      t_tcfg[key]
    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
1206562
def options_to_argv(options)
      argv = []
      options.each do |key, val|
        if key.to_s.size == 1
          if val == true
            argv << "-#{key}"
          elsif val == false
            # ignore
          else
            argv << "-#{key}"
            argv << val.to_s
          end
        else
          if val == true
            argv << "--#{key.to_s.tr('_', '-')}"
          elsif val == false
            # ignore
          else
            argv << "--#{key.to_s.tr('_', '-')}=#{val}"
          end
        end
      end
      argv
    end
1097040
def options
      opts = {}
      VALID_CONFIG_KEYS.each_key do |k|
        opts.merge!(k => send(k))
      end
      opts
    end
120179
def extract_options!(array)
      if array.last.is_a?(Hash) && array.last.instance_of?(Hash)
        array.pop
      else
        {}
      end
    end
532276
def option?(name)
      local_options.any? { |_, v| v.name == name.to_sym }
    end
353405
def transform_options(options)
      args = []
      options.keys.each do |opt|
        if opt.to_s.size == 1
          if options[opt] == true
            args << "-#{opt}"
          elsif options[opt] == false
            # ignore
          else
            val = options.delete(opt)
            args << "-#{opt.to_s} '#{e(val)}'"
          end
        else
          if options[opt] == true
            args << "--#{opt.to_s.gsub(/_/, '-')}"
          elsif options[opt] == false
            # ignore
          else
            val = options.delete(opt)
            args << "--#{opt.to_s.gsub(/_/, '-')}='#{e(val)}'"
          end
        end
      end
      args
    end
688061
function Options(options) {
  if (!(this instanceof Options)) {
    return new Options(options);
  }
  this.defaults = this.defaults || {};
  this.options = this.options || {};
  if (options) {
    this.option(options);
  }
}
905245
def build(option_hash)
      opts = option_hash.dup || {}
      @relation = @base.scoped
      opts.stringify_keys!
      opts = collapse_multiparameter_options(opts)
      assign_attributes(opts)
      self
    end
811489
def config
      @config ||= begin
        Hash.new do |hash, key|
          raise ConfigurationError, "Configuration key #{key} in task #{name} doesn't exist"
        end.tap do |hash|
          hash.define_singleton_method(:declare) do |*keys|
            keys.each { |key| self[key] = nil unless self.has_key?(key) }
          end
        end
      end
    end
758645
def config(name = nil, value = nil)
      if(name && value)
        # set value
        lib.config_set(name, value)
      elsif (name)
        # return value
        lib.config_get(name)
      else
        # return hash
        lib.config_list
      end
    end
1254400
def print_version(options)
      log.log "#{HamlLint::APP_NAME} #{HamlLint::VERSION}"

      if options[:verbose_version]
        log.log "haml #{Gem.loaded_specs['haml'].version}"
        log.log "rubocop #{Gem.loaded_specs['rubocop'].version}"
        log.log RUBY_DESCRIPTION
      end
    end
590181
def extract_options(names)
      options = {}
      options = names.pop if names.last.kind_of? Hash
      options = { :desc => @next_desc, 
                  :long_desc => @next_long_desc,
                  :default_value => @next_default_value,
                  :arg_name => @next_arg_name}.merge(options)
    end