Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Alias #to_xml to #text for Twilio::TwiML::Response #90

Merged
merged 1 commit into from

2 participants

@LeoAdamek

#to_xml is the more common way to get an XML serialized object, and some libraries/frameworks (e.g. Grape) expect a #to_xml method to exist.

Aliases #to_xml to #text

@carlosdp
Collaborator

:+1: more conforming with popular convention.

@carlosdp carlosdp merged commit 0137ff8 into twilio:master
@carlosdp
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 26, 2014
  1. @LeoAdamek

    Alias #to_xml to #text

    LeoAdamek authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/twilio-ruby/twiml/response.rb
View
1  lib/twilio-ruby/twiml/response.rb
@@ -3,6 +3,7 @@ module TwiML
class Response
attr_reader :text
+ alias_method :to_xml , :text
def initialize(&block)
xml = Builder::XmlMarkup.new
Something went wrong with that request. Please try again.