public function getOption($name) {
    if (!array_key_exists($name, $this->options)) {
      throw new InvalidArgumentException(sprintf('Undefined option: "%s"', $name));
    }

    return $this->options[$name];
  }