code: public function method($name)
      {
          $this->typeCheck->method(func_get_args());
  
          foreach ($this->methods() as $method) {
              if ($method->name() === $name) {
                  return $method;
              }
          }
  
          throw new Exception\UndefinedMethodException($this->className(), $name);
      }
docs: @param string $name
  
  @return MethodDefinition