class TablePrint::ConfigResolver

def get_and_remove(options_array, key)

def get_and_remove(options_array, key)
  except = options_array.select do |option|
    option.is_a? Hash and option.keys.include? key
  end
  return [] if except.empty?
  except = except.first
  option_of_interest = except.fetch(key)
  except.delete(key)
  options_array.delete(except) if except.keys.empty?  # if we've taken all the info from this option, get rid of it
  option_of_interest
end