def selector_matches?(selector)
      selector.any? do |group|
        group.keys.all? do |key|
          input_has_key?(key) && (@input[key] == group[key] || group[key].nil?)
        end
      end
    end
def selector_matches?(selector)
      selector.any? do |group|
        group.keys.all? do |key|
          input_has_key?(key) && (@input[key] == group[key] || group[key].nil?)
        end
      end
    end
REFACTOR to selector class