Class: LogStash::Outputs::LogstashAzureBlobOutput::PathValidator
- Inherits:
-
Object
- Object
- LogStash::Outputs::LogstashAzureBlobOutput::PathValidator
- Defined in:
- lib/logstash/outputs/blob/path_validator.rb
Overview
a sub class of LogstashAzureBlobOutput
valdiates the path for the temporary directory
Constant Summary collapse
- INVALID_CHARACTERS =
"\^`><".freeze
Class Method Summary collapse
-
.matches_re ⇒ Object
define the invalid characters that shouldn’t be in the path name.
-
.valid?(name) ⇒ Boolean
boolean method to check if a name is valid.
Class Method Details
.matches_re ⇒ Object
define the invalid characters that shouldn’t be in the path name
14 15 16 |
# File 'lib/logstash/outputs/blob/path_validator.rb', line 14 def self.matches_re /[#{Regexp.escape(INVALID_CHARACTERS)}]/ end |
.valid?(name) ⇒ Boolean
boolean method to check if a name is valid
9 10 11 |
# File 'lib/logstash/outputs/blob/path_validator.rb', line 9 def self.valid?(name) name.match(matches_re).nil? end |