Class: LogStash::Setting::Validator
- Inherits:
-
LogStash::Setting
- Object
- LogStash::Setting
- LogStash::Setting::Validator
- Defined in:
- lib/logstash/settings.rb
Instance Attribute Summary
Attributes inherited from LogStash::Setting
Instance Method Summary collapse
-
#initialize(name, default = nil, strict = true, validator_class = nil) ⇒ Validator
constructor
A new instance of Validator.
- #validate(value) ⇒ Object
Methods inherited from LogStash::Setting
#==, #reset, #set, #set?, #strict?, #to_hash, #validate_value, #value
Methods included from Util::Loggable
included, #logger, #slow_logger
Constructor Details
#initialize(name, default = nil, strict = true, validator_class = nil) ⇒ Validator
Returns a new instance of Validator.
367 368 369 370 |
# File 'lib/logstash/settings.rb', line 367 def initialize(name, default=nil, strict=true, validator_class=nil) @validator_class = validator_class super(name, ::Object, default, strict) end |
Instance Method Details
#validate(value) ⇒ Object
372 373 374 |
# File 'lib/logstash/settings.rb', line 372 def validate(value) @validator_class.validate(value) end |