Creates a getter that will call value's method with specified name
    using the context's key as first argument.
    @param method_name: the name of a method belonging to the value.
    @type method_name: str
976498
def value_get(method_name):
    

    def value_get(value, context, **_params):
        method = getattr(value, method_name)
        return _get(method, context["key"], (), {})

    return value_get
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
1337305
def method_caller(method_name, *args, **kwargs):
	
	def call_method(target):
		func = getattr(target, method_name)
		return func(*args, **kwargs)
	return call_method
678944
public MethodMetaArgs createGetMethod(HandlerMetaDef handlerMetaDef, Object keyValue) {

		String p_methodName = handlerMetaDef.getFindMethod();
		if (p_methodName == null) {
			Debug.logError("[JdonFramework] not configure the findMethod parameter: <getMethod name=XXXXX /> ", module);
		}
		if (keyValue == null) {
			Debug.logError("[JdonFramework] not found model's key value:" + handlerMetaDef.getModelMapping().getKeyName()
					+ "=? in request parameters", module);
		}
		return createCRUDMethodMetaArgs(p_methodName, keyValue);
	}
1276744
def get_method(self, name, descriptor):
        
        key = name + str(descriptor)
        if key not in self.methods:
            self.methods[key] = ExternalMethod(self.name, name, descriptor)

        return self.methods[key]
386761
def method_missing(method_name, *args, &block)
      mapped_key = key_map[method_name.to_sym]
      if attributes.has_key?(mapped_key)
        attributes[mapped_key]
      else
        super
      end
    end
686163
public static function create($class_name, $method_name) {
    if (is_string($class_name)) {
      $class_name = NameNode::create($class_name);
    }
    /** @var ClassMethodCallNode $node */
    $node = new static();
    $node->addChild($class_name, 'className');
    $node->addChild(Token::doubleColon());
    $node->addChild(Token::identifier($method_name), 'methodName');
    $node->addChild(Token::openParen(), 'openParen');
    $node->addChild(new CommaListNode(), 'arguments');
    $node->addChild(Token::closeParen(), 'closeParen');
    return $node;
  }
345782
def locale_dating_wrapper_method_names(attr_name, options)
      getter_name = options[:name].try(:to_sym)
      getter_name ||= "#{attr_name}_#{options[:ending]}".to_sym
      setter_name = "#{getter_name}=".to_sym
      # Detect if the names overwrite existing methods on the generated instance and prevent it. (presumed to be unintentional)
      class_eval do
        raise MethodOverwriteError, "locale_dating setting would overwrite method '#{getter_name}' for attribute '#{attr_name}'" if self.respond_to?(getter_name)
        raise MethodOverwriteError, "locale_dating setting would overwrite method '#{setter_name}' for attribute '#{attr_name}'" if self.respond_to?(setter_name)
      end
      # Return the values
      [getter_name, setter_name]
    end
247390
def source_set(method_name):
    

    def source_set(value, context, **_params):
        method = getattr(context["model"].source, method_name)
        return _set(method, context["key"], value, (), {})

    return source_set
874218
def method_name_exist(self, meth_name):
        

        methods = self.current_class.get_methods()
        for m in methods:
            if m.name == meth_name:
                return True
        return False
432682
def _CreateMethod(self, method_name):
    
    soap_service_method = self.zeep_client.service[method_name]

    def MakeSoapRequest(*args):
      AddToUtilityRegistry('zeep')
      soap_headers = self._GetZeepFormattedSOAPHeaders()
      packed_args = self._PackArguments(method_name, args)
      try:
        return soap_service_method(
            *packed_args, _soapheaders=soap_headers)['body']['rval']
      except zeep.exceptions.Fault as e:
        error_list = ()
        if e.detail is not None:
          underlying_exception = e.detail.find(
              '{%s}ApiExceptionFault' % self._GetBindingNamespace())
          fault_type = self.zeep_client.get_element(
              '{%s}ApiExceptionFault' % self._GetBindingNamespace())
          fault = fault_type.parse(
              underlying_exception, self.zeep_client.wsdl.types)
          error_list = fault.errors or error_list
        raise googleads.errors.GoogleAdsServerFault(
            e.detail, errors=error_list, message=e.message)
    return MakeSoapRequest
799059
def source_get(method_name):
    

    def source_get(_value, context, **_params):
        method = getattr(context["model"].source, method_name)
        return _get(method, context["key"], (), {})

    return source_get
451130
def getter_for(instance_name)
      return_statement = ReturnStatement.new(InstanceVariable.new(instance_name))
      MethodStatement.new(instance_name , [] , return_statement).to_vool
    end
306725
def normalize_method_name(method_name)
      method_string = method_name.to_s
      method_string.chop! if method_string.end_with?('=')
      method_string.to_sym
    end
635834
def _method_url(self, method_name):
        
        return "{base_url}/api/{api}/{method}".format(
            base_url=self._base_url(),
            api=self.api_version,
            method=method_name
        )
723596
def get_methods_by_name(self, name):
        

        return (m for m in self.methods if m.get_name() == name)
573083
def get_method_docstring(cls, method_name):
    
    method = getattr(cls, method_name, None)
    if method is None:
        return
    docstrign = inspect.getdoc(method)
    if docstrign is None:
        for base in cls.__bases__:
            docstrign = get_method_docstring(base, method_name)
            if docstrign:
                return docstrign
        else:
            return None

    return docstrign