Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/wavefront-sdk/stdlib/array.rb

Overview

Extensions to stdlib Array

Instance Method Summary collapse

Instance Method Details

#uri_concatString

Join strings together to make a URI path in a way that is more flexible than URI::Join. Removes multiple and trailing separators. Does not have to produce fully qualified paths. Has no concept of protocols, hostnames, or query strings.

Returns:



13
14
15
# File 'lib/wavefront-sdk/stdlib/array.rb', line 13

def uri_concat
  join('/').squeeze('/').sub(%r{/$}, '').sub(%r{/\?}, '?')
end