Class: Plivo::XML::PlivoXML

Inherits:
Object
  • Object
show all
Defined in:
lib/plivo/xml/plivo_xml.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response = nil) ⇒ PlivoXML

Returns a new instance of PlivoXML.



6
7
8
# File 'lib/plivo/xml/plivo_xml.rb', line 6

def initialize(response = nil)
  response.nil? ? @response = Plivo::XML::Response.new : @response = response
end

Instance Attribute Details

#responseObject

Returns the value of attribute response.



4
5
6
# File 'lib/plivo/xml/plivo_xml.rb', line 4

def response
  @response
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/plivo/xml/plivo_xml.rb', line 14

def to_s
  '<?xml version="1.0" encoding="utf-8" ?>' + @response.to_s
end

#to_xmlObject



10
11
12
# File 'lib/plivo/xml/plivo_xml.rb', line 10

def to_xml
  '<?xml version="1.0" encoding="utf-8" ?>' + @response.to_xml
end