module Restcomm::Util

Public Instance Methods

get_string(obj) click to toggle source
   # File lib/restcomm-ruby/util.rb
 7 def get_string(obj)
 8   if obj.respond_to?(:strftime)
 9     obj.strftime('%Y-%m-%d')
10   else
11     obj.to_s
12   end
13 end
url_encode(hash) click to toggle source
  # File lib/restcomm-ruby/util.rb
3 def url_encode(hash)
4   hash.to_a.map {|p| p.map {|e| CGI.escape get_string(e)}.join '='}.join '&'
5 end