Class: LogStash::Util::ModulesSettingArray

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/logstash/util/modules_setting_array.rb

Constant Summary collapse

DELEGATED_METHODS =
[].public_methods.reject{|symbol| symbol.to_s.end_with?('__')}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ ModulesSettingArray

Returns a new instance of ModulesSettingArray.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/logstash/util/modules_setting_array.rb', line 12

def initialize(value)
  unless value.is_a?(Array)
    raise ArgumentError.new("Module Settings must be an Array. Received: #{value.class}")
  end
  @original = value
  # wrap passwords
  @original.each do |hash|
    hash.keys.select{|key| key.to_s.end_with?('password') && !hash[key].is_a?(LogStash::Util::Password)}.each do |key|
      hash[key] = LogStash::Util::Password.new(hash[key])
    end
  end
end

Instance Attribute Details

#originalObject (readonly)

Returns the value of attribute original.



11
12
13
# File 'lib/logstash/util/modules_setting_array.rb', line 11

def original
  @original
end

Instance Method Details

#__class__Object



25
26
27
# File 'lib/logstash/util/modules_setting_array.rb', line 25

def __class__
  LogStash::Util::ModulesSettingArray
end