Class: String

Inherits:
Object show all
Defined in:
lib/rapuncel/core_ext/string.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_xml_rpc(xml_node) ⇒ Object



8
9
10
11
# File 'lib/rapuncel/core_ext/string.rb', line 8

def self.from_xml_rpc xml_node
  xml_node.text.gsub(/(\r\n|\r)/, "\n") #just give back the string between the 'string' tags
  # DISCUSS: to strip or not to strip
end

Instance Method Details

#to_xml_rpc(b = Rapuncel.get_builder) ⇒ Object



2
3
4
5
6
# File 'lib/rapuncel/core_ext/string.rb', line 2

def to_xml_rpc b = Rapuncel.get_builder
  b.string self

  b.to_xml
end