Handles a call of #option_name.
 Determines whether the call was meant to be a setter or a getter and
 acts accordingly.
176938
def handle_option_call(option_name, *args, &block)
      if getter?(option_name, *args, &block)
        current_value(option_name)
      else
        new_value = new_value(option_name, *args, &block)
        instance.class.new(@values.merge(option_name.to_sym => new_value))
      end
    end
505404
function Option(handler, options, desc) {
  Option.super_.apply(this, [handler, options, desc]);

  if (options.params && options.params.hasOwnProperty('optional')) {
    throw new Error('optional parameter is not allowed for options');
  }
}
350307
function (name, value, options) {
            var _member = this.member(name);
            if (_member && _member.setter) {
                _member.setter.call(this, value, options);
            }

            return this;
        }
694821
def options
      accepted_options.each_with_object({}) do |option_name, options|
        option_value         = send(option_name)
        options[option_name] = option_value unless option_value.nil?
      end
    end
104428
def options
      opts    = fetch('options', {})
      headers = fetch('headers', {})
      if value = accept
        headers[:accept] = value
      end
      opts[:raw]     = key?('raw') ? self['raw'] : false
      opts[:headers] = headers unless headers.empty?
      opts
    end
264112
def set_option(self, name, value):
        """"""
        _assert_value_is_valid(name)
        self._options[name] = value
805674
def handle_select(self):
        """"""
        self.selected = input('>> ')
        if self.selected in ['Q', 'q']:
            sys.exit(1)
        elif self.selected in ['B', 'b']:
            self.back_to_menu = True
            return True
        elif is_num(self.selected):
            if 0 <= int(self.selected) <= len(self.hrefs) - 1:
                self.back_to_menu = False
                return True
            else:
                print(Colors.FAIL +
                      'Wrong index. ' +
                      'Please select an appropiate one or other option.' +
                      Colors.ENDC)
                return False
        else:
            print(Colors.FAIL +
                  'Invalid input. ' +
                  'Please select an appropiate one or other option.' +
                  Colors.ENDC)
            return False
163168
def option(option, *args)
      args.size > 0 ? set(option, args.first) : get(option)
    end
942944
def get_option_default(self, opt_name):
        
        if not self.has_option(opt_name):
            raise ValueError("Unknow option name (%s)" % opt_name)
        return self._options[opt_name].default
101990
def _set_option(self, name, value, allow_clear=False):
        """"""
        if not allow_clear:
            # Prevent clears if value was set
            try:
                current_value = self._get_option(name)
                if value is None and current_value is not None:
                    return
            except AttributeError:
                pass

        self.opts[name] = value
544661
@Override @DefinedBy(Api.COMPILER)
    public boolean handleOption(String current, Iterator<String> remaining) {
        OptionHelper helper = new GrumpyHelper(log) {
            @Override
            public String get(Option option) {
                return options.get(option);
            }

            @Override
            public void put(String name, String value) {
                options.put(name, value);
            }

            @Override
            public void remove(String name) {
                options.remove(name);
            }

            @Override
            public boolean handleFileManagerOption(Option option, String value) {
                return handleOption(option, value);
            }
        };

        Option o = Option.lookup(current, javacFileManagerOptions);
        if (o == null) {
            return false;
        }

        try {
            o.handleOption(helper, current, remaining);
        } catch (Option.InvalidValueException e) {
            throw new IllegalArgumentException(e.getMessage(), e);
        }

        return true;
    }
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
1166815
def handle_option_error(func):
    

    def wrapped(*args):
        try:
            return func(*args)
        except options.RuleOptionError as e:
            raise LintConfigError(ustr(e))

    return wrapped
584878
protected void handleUndefinedMode(CliOptionContainer option) {

    CliStyle style = this.cliState.getCliStyle();
    CliStyleHandling handling = style.modeUndefined();
    if (handling != CliStyleHandling.OK) {
      ObjectNotFoundException exception = new ObjectNotFoundException(CliMode.class, option.getOption().mode());
      handling.handle(getLogger(), exception);
    }
  }
293175
def handler(value)
      if value.zero?
        @up_callback.call if @up_callback
      else
        @last_press = Time.now
        @down_callback.call if @down_callback
      end

      if value.zero? && (Time.now - @last_press) > @hold_time
        @hold_callback.call if @hold_callback
      end
    end
1367920
def _isSetter(node_type, node):
    
    if node_type not in ['function', 'method']:
        return False

    for name in _getDecoratorsName(node):
        if '.setter' in name:
            return True
    return False
1013379
def has_option(self, option_name):
		
		if self.prefix:
			option_name = self.prefix + self.seperator + option_name
		item_names = option_name.split(self.seperator)
		node = self._storage
		for item_name in item_names:
			if node is None:
				return False
			if not item_name in node:
				return False
			node = node[item_name]
		return True