Class: LogStash::Outputs::Swift::PathValidator
- Inherits:
-
Object
- Object
- LogStash::Outputs::Swift::PathValidator
- Defined in:
- lib/logstash/outputs/swift/path_validator.rb
Constant Summary collapse
- INVALID_CHARACTERS =
"\^`><"
Class Method Summary collapse
Class Method Details
.matches_re ⇒ Object
12 13 14 |
# File 'lib/logstash/outputs/swift/path_validator.rb', line 12 def self.matches_re /[#{Regexp.escape(INVALID_CHARACTERS)}]/ end |
.valid?(name) ⇒ Boolean
8 9 10 |
# File 'lib/logstash/outputs/swift/path_validator.rb', line 8 def self.valid?(name) name.match(matches_re).nil? end |