class Bitly4R::Params
Params
¶ ↑
Extends the Hash class to provide simply composition of a URL-encoded string.
Could have extended Hash, but chose instead to ‘leave no trace’.
Public Instance Methods
to_s()
click to toggle source
An encoded composite of the parameters, ready for use in a URL
# File lib/bitly4r/objects.rb 43 def to_s 44 (self.to_a.collect do |k, v| 45 "#{CGI.escape(k.to_s)}=#{CGI.escape(v.to_s)}" 46 end).join('&') 47 end