Sha256: b9c8bab093a8f13ec23b110852551c0587bc31ff6b4b4e3594e574a95d1220ef

Contents?: true

Size: 463 Bytes

Versions: 3

Compression:

Stored size: 463 Bytes

Contents

require 'stringio'
require "massive_sitemap/writer/base"

# Write into String
# Perfect for testing porpuses
module MassiveSitemap
  module Writer

    class String < Base

      def open_stream
        @string ||= StringIO.new
      end

      def to_s
        @string.string rescue ""
      end

      def ==(other_string)
        to_s == other_string
      end

      def include?(other_string)
        to_s.include?(other_string)
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
massive_sitemap-2.0.0.rc3 lib/massive_sitemap/writer/string.rb
massive_sitemap-2.0.0.rc2 lib/massive_sitemap/writer/string.rb
massive_sitemap-2.0.0.rc1 lib/massive_sitemap/writer/string.rb