Class: KeysValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/plugin/keys_validator.rb

Instance Method Summary collapse

Instance Method Details

#keys_are_valid?(keys, record) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/fluent/plugin/keys_validator.rb', line 3

def keys_are_valid?(keys, record)
current_record = record

keys.each do |key|

	if (!current_record.key?(key))
		return false
    end

	current_record = current_record[key]
end

return true
end