class Bandwidth::Xml::Response
Root class for Bandwidth
XML
Public Class Methods
new(verbs = nil)
click to toggle source
Initializer @param verbs [Array] optional list of verbs to include into response
# File lib/bandwidth/xml/response.rb, line 9 def initialize(verbs = nil) @verbs = verbs || [] end
Public Instance Methods
<<(verb)
click to toggle source
Add a verb to this response
# File lib/bandwidth/xml/response.rb, line 29 def <<(verb) @verbs << verb end
push(*verbs)
click to toggle source
Add one or more verbs to this response
# File lib/bandwidth/xml/response.rb, line 24 def push(*verbs) @verbs.push(*verbs) end
to_xml()
click to toggle source
Return XML presentaion of this response
# File lib/bandwidth/xml/response.rb, line 14 def to_xml() xml = Builder::XmlMarkup.new() xml.instruct!(:xml, :version=>'1.0', :encoding=>'UTF-8') xml.Response do @verbs.each {|verb| verb.to_xml(xml)} end xml.target!() end