Class: LogStash::Setting::ExistingFilePath
- Inherits:
-
LogStash::Setting
- Object
- LogStash::Setting
- LogStash::Setting::ExistingFilePath
- Defined in:
- lib/logstash/settings.rb
Instance Attribute Summary
Attributes inherited from LogStash::Setting
Instance Method Summary collapse
-
#initialize(name, default = nil, strict = true) ⇒ ExistingFilePath
constructor
A new instance of ExistingFilePath.
Methods inherited from LogStash::Setting
#==, #reset, #set, #set?, #strict?, #to_hash, #validate_value, #value
Constructor Details
#initialize(name, default = nil, strict = true) ⇒ ExistingFilePath
Returns a new instance of ExistingFilePath.
426 427 428 429 430 431 432 433 434 |
# File 'lib/logstash/settings.rb', line 426 def initialize(name, default=nil, strict=true) super(name, ::String, default, strict) do |file_path| if !::File.exists?(file_path) raise ::ArgumentError.new("File \"#{file_path}\" must exist but was not found.") else true end end end |