Internal dispatch setter for config values.

 === Parameters
 symbol<Symbol>:: Name of the method (variable setter)
 value<Object>:: Value to be set in config hash
162793
def internal_set(symbol, value)
      if configurables.key?(symbol)
        configurables[symbol].set(configuration, value)
      elsif config_contexts.key?(symbol)
        config_contexts[symbol].restore(value.to_hash)
      else
        if config_strict_mode == :warn
          Chef::Log.warn("Setting unsupported config value #{symbol}.")
        elsif config_strict_mode
          raise UnknownConfigOptionError, "Cannot set unsupported config value #{symbol}."
        end
        configuration[symbol] = value
      end
    end
718884
def config_value_for(key, default = nil, check_live = true)
      key = key.to_s
      value = check_live ? self[key.to_s] : nil
      value || config[key] || self.class.config_value_for(key) || default
    end
1074764
def set_adapter_variables(name:, variables: nil)
      return unless variables

      case variables
      when Hash
        set_adapter_variables_by_hash(name: name, variables: variables)
      when String
        set_adapter_variables(name: name, variables: yaml_content(variables))
      else
        raise "Unknown variables type #{variables.class}"
      end
    rescue StandardError => e
      raise ::Knowledge::LearnError, e.message
    end
1087614
def set(key, value)
      types[key.to_sym] = (value == [] ? [] : (value.is_a?(Symbol) ? value : nil))
      messages[key.to_sym] = value
    end
1245173
def set_param(key, value)
      code, message, value = @server.call("setParam", @caller_id, key, value)
      case code
      when 1
        return true
      when -1
        raise message
      else
        return false
      end
    end
870048
def method_missing(name, *args, &block)
      getter_name = name[0..-2]

      if name =~ /^[a-z]+=$/ && !respond_to?(getter_name)
        define_accessor(getter_name, args.first)
      else
        super
      end
    end
718749
public static MethodInstance getSetter(Object obj, String prop, Object value, MethodInstance defaultValue) {
	prop = "set" + StringUtil.ucFirst(prop);
	MethodInstance mi = getMethodInstanceEL(obj, obj.getClass(), KeyImpl.getInstance(prop), new Object[] { value });
	if (mi == null) return defaultValue;
	Method m = mi.getMethod();

	if (m.getReturnType() != void.class) return defaultValue;
	return mi;
    }
1154219
def options
      map = Config.class_variables.map do |key|
        [key.to_s.tr('@', '').to_sym, class_variable_get(:"#{key}")]
      end
      Hash[map]
    end
596666
def define_helper(method_name, base_hash)
      # Which kind of wildcards (if any) do we need to support?
      combined = []
      base_hash.each_value do |v|
        combined += v if v.is_a?(Array)
        combined << v if v.is_a?(String)
      end
      key_value = combined.any? { |i| i.is_a?(String) && /<\S+>/ =~ i }
      printf = combined.any? { |i| i.is_a?(String) && /%/ =~ i }

      if key_value && printf
        fail 'Invalid mixture of key-value and printf wildcards ' \
             "in #{method_name}: #{combined}"
      elsif key_value
        define_key_value_helper(method_name, base_hash)
      elsif printf
        arg_count = combined.join.scan(/%/).length
        define_printf_helper(method_name, base_hash, arg_count)
      else
        # simple static token(s)
        define_static_helper(method_name, base_hash)
      end
      @hash[method_name] = true
    end
968069
def config_arg(arguments, key, default = nil)
      value = if arguments[key].present?
        arguments[key]
      else
        configuration[key]
      end

      value = value.to_s if value.kind_of? Symbol

      return value
    end
1282034
def set(key, value = nil)
      if key.is_a?(Hash)
        properties.merge!(key)
      else
        properties[key] = value
      end
    end
1020889
def attr_writer(*methods)
      methods.each do |method|
        define_method("#{method}=") do |value|
          instance_variable_set(:"@#{method}", value)
        end
      end
    end
1289706
def define_accessors(option, value)
      setter = proc { |val|  set option, val, true }
      getter = proc { value }

      define_singleton_method("#{option}=", setter) if setter
      define_singleton_method(option, getter) if getter
    end
1057298
def set(self, name, value, default=False, imported=False):
        
        if name in self.__dict__:
            self.__dict__[name] = value
            return

        if name not in self.settings and self.prefix:
            prefix_name = '%s_%s' % (self.prefix, name)
            if prefix_name in self.settings:
                return  # don't do anything

        if name in self.settings:
            self.settings[name].set(value, default=default, imported=imported)
        elif not imported:
            self.params[name] = value
1018255
def method(self, symbol_name):
        

        s = self.symbol(symbol_name)

        def bind(fn):
            setattr(s, fn.__name__, fn)
        return bind
474989
def config_property(name, type, value)
      RubyAem::Resources::ConfigProperty.new(@client, name, type, value)
    end
835987
def enum(name = nil, localized_name = name)

      if block_given?

        yield.each do |key, value|
          options = value.map { |k, v| [ k.to_sym, v ] }.to_h
          #options[:optional] = true if options[:optional].nil?
          code    = options.delete :code
          safe_add_item ProgneTapera::EnumItem.new(code, key.to_s, options)
        end

      else

        name         = enum_name(name).to_s
        enumerations = Rails.configuration.enum[name]
        raise ArgumentError.new("The enum.#{name} was not configured in the config/enum.yml file.") if enumerations.blank?

        enumerations.each do |key, value|
          options = value.map { |k, v| [ k.to_sym, v ] }.to_h
          #options[:optional] = false
          code    = options.delete :code
          options[:localized_name] = I18n.t "enum.#{localized_name||name}.#{key}"
          item = ProgneTapera::EnumItem.new code, key, options

          item_method_module = "#{self.name}::ItemMethods".safe_constantize
          item.class_eval do
            include item_method_module if item_method_module.present?
          end
          #class << item
          #  include item_method_module if item_method_module.present?
          #end

          safe_add_item item
        end

      end

    end