Class: Object

Inherits:
BasicObject
Defined in:
lib/restfully/extensions.rb

Instance Method Summary collapse

Instance Method Details

#to_paramsObject



12
13
14
# File 'lib/restfully/extensions.rb', line 12

def to_params
  to_s
end

#to_query(key) ⇒ Object

Taken from ActiveSupport



7
8
9
10
# File 'lib/restfully/extensions.rb', line 7

def to_query(key)
  require 'cgi' unless defined?(CGI) && defined?(CGI::escape)
  "#{CGI.escape(key.to_s)}=#{CGI.escape(to_params.to_s)}"
end