Class: MassiveSitemap::Writer::String

Inherits:
Base
  • Object
show all
Defined in:
lib/massive_sitemap/writer/string.rb

Constant Summary

Constants inherited from Base

Base::OPTS

Instance Method Summary collapse

Methods inherited from Base

#close!, #current, #each, #init!, #inited?, #initialize, #print, #set

Constructor Details

This class inherits a constructor from MassiveSitemap::Writer::Base

Instance Method Details

#==(other_string) ⇒ Object



17
18
19
# File 'lib/massive_sitemap/writer/string.rb', line 17

def ==(other_string)
  to_s == other_string
end

#include?(other_string) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/massive_sitemap/writer/string.rb', line 21

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

#to_sObject

accessors to conent, mainly used in tests



13
14
15
# File 'lib/massive_sitemap/writer/string.rb', line 13

def to_s
  @string.string rescue ""
end