class Vines::SaslError
Constants
- NAMESPACE
Public Class Methods
new(text=nil)
click to toggle source
# File lib/vines/error.rb, line 18 def initialize(text=nil) @text = text end
Public Instance Methods
to_xml()
click to toggle source
# File lib/vines/error.rb, line 22 def to_xml doc = Document.new doc.create_element('failure') do |node| node.add_namespace(nil, NAMESPACE) node << doc.create_element(element_name) if @text node << doc.create_element('text') do |text| text['xml:lang'] = 'en' text.content = @text end end end.to_xml(:indent => 0).gsub(/\n/, '') end