Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/wavefront-sdk/mixins.rb
Overview
Extensions to stdlib Array
Instance Method Summary collapse
-
#uri_concat ⇒ String
Join strings together to make a URI path in a way that is more flexible than URI::Join.
Instance Method Details
#uri_concat ⇒ String
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.
57 58 59 |
# File 'lib/wavefront-sdk/mixins.rb', line 57 def uri_concat self.join('/').squeeze('/').sub(/\/$/, '').sub(/\/\?/, '?') end |