1
0
mirror of https://github.com/meineerde/rackstash.git synced 2026-02-01 01:37:12 +00:00

Move Fields::Hash#forbidden_key? into its correct alphabetical position

This commit is contained in:
Holger Just 2017-03-07 14:52:12 +01:00
parent b2d2a89488
commit 2070bf81a7

View File

@ -212,6 +212,13 @@ module Rackstash
@raw.empty?
end
# @param key [String] The name of a key to check. This MUST be a correctly
# encoded String in order to return valid results
# @return [Boolean] `true` if the key is forbidden from being added
def forbidden_key?(key)
@forbidden_keys.include?(key)
end
# Returns true if the given key is present in `self`.
#
# h = Rackstash::Fields::Hash.new
@ -336,13 +343,6 @@ module Rackstash
end
alias update merge!
# @param key [String] The name of a key to check. This MUST be a correctly
# encoded String in order to return valid results
# @return [Boolean] `true` if the key is forbidden from being added
def forbidden_key?(key)
@forbidden_keys.include?(key)
end
# Set a `key` of `self` to the returned value of the passed block.
# If the key is forbidden from being set or already exists with a value
# other than `nil`, the block will not be called and the value will not be