Class: LogStash::Setting::ArrayCoercible
- Inherits:
- 
      Coercible
      
        - Object
- LogStash::Setting
- Coercible
- LogStash::Setting::ArrayCoercible
 
- Defined in:
- lib/logstash/settings.rb
Instance Attribute Summary
Attributes inherited from LogStash::Setting
Instance Method Summary collapse
- #coerce(value) ⇒ Object
- 
  
    
      #initialize(name, klass, default, strict = true, &validator_proc)  ⇒ ArrayCoercible 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of ArrayCoercible. 
Methods inherited from Coercible
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, klass, default, strict = true, &validator_proc) ⇒ ArrayCoercible
Returns a new instance of ArrayCoercible.
| 513 514 515 516 | # File 'lib/logstash/settings.rb', line 513 def initialize(name, klass, default, strict=true, &validator_proc) @element_class = klass super(name, ::Array, default, strict, &validator_proc) end | 
Instance Method Details
#coerce(value) ⇒ Object
| 518 519 520 | # File 'lib/logstash/settings.rb', line 518 def coerce(value) Array(value) end |