module Twilio::Util

Public Instance Methods

get_string(obj) click to toggle source
   # File lib/twilio-ruby/util.rb
10 def get_string(obj)
11   warn "'Twilio::Util::get_string has been deprecated."
12   if obj.respond_to?(:strftime)
13     obj.strftime('%Y-%m-%d')
14   else
15     obj.to_s
16   end
17 end
url_encode(hash) click to toggle source
  # File lib/twilio-ruby/util.rb
5 def url_encode(hash)
6   warn "'Twilio::Util::url_encode has been deprecated."
7   hash.to_a.map { |p| p.map { |e| CGI.escape get_string(e) }.join '=' }.join '&'
8 end