class Restforce::Data::Client

def url(resource)

Returns the url to the resource.

resource - A record that responds to to_sparam or a String/Fixnum.

Public: Returns a url to the resource.
def url(resource)
  resource_name_for_url =
    if resource.respond_to?(:to_sparam)
      resource.to_sparam
    else
      resource
    end
  "#{instance_url}/#{resource_name_for_url}"
end