Sha256: 08675dd3c318e2d897bcba2b5b9a2a1b383bbed30c6bec01ce0499dd3aadd858

Contents?: true

Size: 405 Bytes

Versions: 1

Compression:

Stored size: 405 Bytes

Contents

require 'zlib'

require "massive_sitemap/writer/file"
# Write into GZipped File

module MassiveSitemap
  module Writer

    class GzipFile < File
      OPTS = File::OPTS

      def open_stream
        ::Zlib::GzipWriter.new(super)
      end

      private
      def filename
        super + ".gz"
      end

      def files
        Dir[::File.join(options[:root], "*.xml.gz")]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
massive_sitemap-2.0.0.rc3 lib/massive_sitemap/writer/gzip_file.rb