def given?(input, *rest) # rubocop:disable Metrics/CyclomaticComplexity
      filter_level = self.class
      input_level = @_interaction_inputs

      [input, *rest].map(&:to_sym).each do |key|
        filter_level = filter_level.filters[key]

        break false if filter_level.nil? || input_level.nil?
        break false unless input_level.key?(key) || input_level.key?(key.to_s)

        input_level = input_level[key] || input_level[key.to_s]
      end && true
    end
def given?(input, *rest) # rubocop:disable Metrics/CyclomaticComplexity
      filter_level = self.class
      input_level = @_interaction_inputs

      [input, *rest].map(&:to_sym).each do |key|
        filter_level = filter_level.filters[key]

        break false if filter_level.nil? || input_level.nil?
        break false unless input_level.key?(key) || input_level.key?(key.to_s)

        input_level = input_level[key] || input_level[key.to_s]
      end && true
    end
Returns `true` if the given key was in the hash passed to {.run}.
 Otherwise returns `false`. Use this to figure out if an input was given,
 even if it was `nil`. Keys within nested hash filter can also be checked
 by passing them in series.

 @example
   class Example < ActiveInteraction::Base
     integer :x, default: nil
     def execute; given?(:x) end
   end
   Example.run!()        # => false
   Example.run!(x: nil)  # => true
   Example.run!(x: rand) # => true

 @example Nested checks
   class Example < ActiveInteraction::Base
     hash :x, default: {} do
       integer :y, default: nil
     end
     def execute; given?(:x, :y) end
   end
   Example.run!()               # => false
   Example.run!(x: nil)         # => false
   Example.run!(x: {})          # => false
   Example.run!(x: { y: nil })  # => true
   Example.run!(x: { y: rand }) # => true

 @param input [#to_sym]

 @return [Boolean]

 @since 2.1.0