lib/sensu/api/utilities/filter_response_content.rb
def filter_response_content!
          if @response_content.is_a?(Array) && !@filter_params.empty?
            attributes = {}
            @filter_params.each do |key, value|
              attributes = deep_merge(attributes, dot_notation_to_hash(key, value))
            end
            @response_content.select! do |object|
              attributes_match?(object, attributes, false)
            end
          end
        end
# Filter the response content if filter parameters have been
# provided. This method mutates `@response_content`, only
# retaining array items that match the attributes provided via
# filter parameters.
Filter the response content if filter parameters have been
provided. This method mutates `@response_content`, only
retaining array items that match the attributes provided via
filter parameters.
Filter the response content if filter parameters have been provided . This method mutates ` @response_content ` only retaining array items that match the attributes provided via filter parameters .
def filter_response_content!
          if @response_content.is_a?(Array) && !@filter_params.empty?
            attributes = {}
            @filter_params.each do |key, value|
              attributes = deep_merge(attributes, dot_notation_to_hash(key, value))
            end
            @response_content.select! do |object|
              attributes_match?(object, attributes, false)
            end
          end
        end
def filter_response_content! if @response_content . is_a? ( Array ) && ! @filter_params . empty? attributes = { } @filter_params . each do | key , value | attributes = deep_merge ( attributes , dot_notation_to_hash ( key , value ) ) end @response_content . select! do | object | attributes_match? ( object , attributes , false ) end end end
Filter the response content if filter parameters have been
provided.
Filter the response content if filter parameters have been provided .