Class: LogStash::Setting::WritableDirectory
- Inherits:
-
LogStash::Setting
- Object
- LogStash::Setting
- LogStash::Setting::WritableDirectory
- Defined in:
- lib/logstash/settings.rb
Instance Attribute Summary
Attributes inherited from LogStash::Setting
Instance Method Summary collapse
-
#initialize(name, default = nil, strict = false) ⇒ WritableDirectory
constructor
A new instance of WritableDirectory.
Methods inherited from LogStash::Setting
#==, #reset, #set, #set?, #strict?, #to_hash, #validate_value, #value
Constructor Details
#initialize(name, default = nil, strict = false) ⇒ WritableDirectory
Returns a new instance of WritableDirectory.
391 392 393 394 395 396 397 398 399 |
# File 'lib/logstash/settings.rb', line 391 def initialize(name, default=nil, strict=false) super(name, ::String, default, strict) do |path| if ::File.directory?(path) && ::File.writable?(path) true else raise ::ArgumentError.new("Path \"#{path}\" is not a directory or not writable.") end end end |