8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/pivotal-tracker-api/string_extensions.rb', line 8
def append_pivotal_params(params, replace=true)
return self if params.nil?
resulting_url = if replace then self else "" end
if self.rindex("?").nil?
resulting_url += "?"
replace(resulting_url)
end
case params
when Array
resulting_url += params_from_array(params)
when Hash
resulting_url += params_from_hash(params)
else
resulting_url += "#{params}"
end
if replace then replace(resulting_url) else resulting_url end
end
|