def _call_filter_for_action?(rule, action_name)
      # Both:
      # * no :only or the current action is in the :only list
      # * no :exclude or the current action is not in the :exclude list
      (!rule.key?(:only) || rule[:only].include?(action_name)) &&
      (!rule.key?(:exclude) || !rule[:exclude].include?(action_name))
    end
def _call_filter_for_action?(rule, action_name)
      # Both:
      # * no :only or the current action is in the :only list
      # * no :exclude or the current action is not in the :exclude list
      (!rule.key?(:only) || rule[:only].include?(action_name)) &&
      (!rule.key?(:exclude) || !rule[:exclude].include?(action_name))
    end
Determine whether the filter should be called for the current action using :only and :exclude.

 ==== Parameters
 rule<Hash>:: Rules for the filter (see below).
 action_name<~to_s>:: The name of the action to be called.

 ==== Options (rule)
 :only<Array>::
   Optional list of actions to fire. If given, action_name must be a part of
   it for this function to return true.
 :exclude<Array>::
   Optional list of actions not to fire. If given, action_name must not be a
   part of it for this function to return true.

 ==== Returns
 Boolean:: True if the action should be called.

 :api: private