Class: LogStash::Util::ModulesSettingArray
- Inherits:
-
Object
- Object
- LogStash::Util::ModulesSettingArray
- 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
-
#original ⇒ Object
readonly
Returns the value of attribute original.
Instance Method Summary collapse
- #__class__ ⇒ Object
-
#initialize(value) ⇒ ModulesSettingArray
constructor
A new instance of ModulesSettingArray.
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
#original ⇒ Object (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 |