Class: String

Inherits:
Object
  • Object
show all
Includes:
SimpleSerializer
Defined in:
lib/xml_serialization.rb

Direct Known Subclasses

RawXML

Constant Summary collapse

XML_HEAD_PATTERN =
/\A\s*<\?xml[^>]*>\s*/m

Instance Method Summary collapse

Methods included from SimpleSerializer

#to_xml

Instance Method Details

#strip_xml_headObject



25
26
27
# File 'lib/xml_serialization.rb', line 25

def strip_xml_head
  sub(XML_HEAD_PATTERN, '')
end

#strip_xml_head!Object



21
22
23
# File 'lib/xml_serialization.rb', line 21

def strip_xml_head!
  sub!(XML_HEAD_PATTERN, '')
end