Sha256: da6e6d3f6f67a5188ed3628395a69bab648bd1d23dc3bacaa56fbfa1725fc729

Contents?: true

Size: 296 Bytes

Versions: 10

Compression:

Stored size: 296 Bytes

Contents

module Twilio
  module Util
    def url_encode(hash)
      hash.to_a.map { |p| p.map { |e| CGI.escape get_string(e) }.join '=' }.join '&'
    end

    def get_string(obj)
      if obj.respond_to?(:strftime)
        obj.strftime('%Y-%m-%d')
      else
        obj.to_s
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
twilio-ruby-5.3.0 lib/twilio-ruby/util.rb
twilio-ruby-5.2.3 lib/twilio-ruby/util.rb
twilio-ruby-5.2.2 lib/twilio-ruby/util.rb
twilio-ruby-5.2.1 lib/twilio-ruby/util.rb
twilio-ruby-5.2.0 lib/twilio-ruby/util.rb
twilio-ruby-5.1.2 lib/twilio-ruby/util.rb
twilio-ruby-5.1.1 lib/twilio-ruby/util.rb
twilio-ruby-5.1.0 lib/twilio-ruby/util.rb
twilio-ruby-5.0.0.alpha1 lib/twilio-ruby/util.rb
twilio-ruby-5.0.0 lib/twilio-ruby/util.rb