Module: Oncall::HTTP
- Defined in:
- lib/oncall/http.rb,
lib/oncall/http/request.rb,
lib/oncall/http/response.rb
Defined Under Namespace
Classes: Request, Response
Class Method Summary
collapse
Class Method Details
.uri(path, params) ⇒ Object
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/oncall/http.rb', line 3
def self.uri(path, params)
parts = path.split('/')
return '/' if parts.empty?
parts.each_with_index do |part, index|
if part.start_with?(':')
part[0] = ''
parts[index] = params[part.to_sym]
end
end
parts.join('/')
end
|