public function write()
    {
        $gemfile = '';

        foreach ($this->parameters as $gem) {
            $line = str_replace('<gem>', $gem, self::$template);
            $gemfile = sprintf('%s%s%s', $gemfile, PHP_EOL, $line);
        }

        $gemfile .= self::$sourceTemplate;

        fwrite($this->file, $this->addHeaders($gemfile));
    }