lib/massive_sitemap/writer/string.rb in massive_sitemap-2.0.0.rc3 vs lib/massive_sitemap/writer/string.rb in massive_sitemap-2.0.0.rc4
- old
+ new
@@ -5,24 +5,25 @@
# Perfect for testing porpuses
module MassiveSitemap
module Writer
class String < Base
-
- def open_stream
- @string ||= StringIO.new
- end
-
+ # accessors to conent, mainly used in tests
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
+
+ protected
+ def open_stream
+ @string ||= StringIO.new
end
end
end
end