Conditions | 6 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
1 | module RingCentralSdk::REST |
||
66 | |||
67 | def build_url(path) |
||
68 | url = '' |
||
69 | if !path.is_a?(Array) |
||
70 | path = [path] |
||
71 | end |
||
72 | if path.length>0 |
||
73 | path0 = path[0].to_s |
||
74 | if path0 !~ /\// |
||
75 | if path0.index('account') != 0 |
||
76 | if path0.index('extension') != 0 |
||
77 | path.unshift('extension/~') |
||
78 | end |
||
79 | path.unshift('account/~') |
||
80 | end |
||
81 | end |
||
82 | end |
||
83 | url = path.join('/') |
||
84 | return url |
||
85 | end |
||
89 |