class ActionController::Parameters

def extract!(*keys)

params # => #3} permitted: false>
params.extract!(:a, :b) # => #1, "b"=>2} permitted: false>
params = ActionController::Parameters.new(a: 1, b: 2, c: 3)

Removes and returns the key/value pairs matching the given keys.
def extract!(*keys)
  new_instance_with_inherited_permitted_status(@parameters.extract!(*keys))
end