public function replaceContents(Array $replacements) {
    $this->writeContents(
      str_replace(
                  array_keys($replacements),
                  array_values($replacements),
                  $this->getContents()
                 )
    );
    return $this;
  }