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.
379 380 381 382 383 384 385 386 387 |
# File 'lib/logstash/settings.rb', line 379 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 |