Module: BucketStore::UriBuilder
- Defined in:
- lib/bucket_store/uri_builder.rb
Class Method Summary collapse
-
.sanitize(input, replacement = "__") ⇒ String
Sanitizes the input as not all characters are valid as either URIs or as bucket keys.
Class Method Details
.sanitize(input, replacement = "__") ⇒ String
Sanitizes the input as not all characters are valid as either URIs or as bucket keys. When we get them we want to replace them with something we can process.
11 12 13 |
# File 'lib/bucket_store/uri_builder.rb', line 11 def self.sanitize(input, replacement = "__") input.gsub(/[{}<>%]/, replacement) end |