AutoApi.State.clear
You're seeing just the function
clear
, go back to AutoApi.State module for more information.
Specs
Clears a property from a state.
If the property is multiple, all of its values will be removed.
Examples
iex> locks = [%AutoApi.Property{data: %{location: :front_left, lock_state: :locked}}]
iex> state = %AutoApi.DoorsState{locks: locks}
iex> AutoApi.State.clear(state, :locks)
%AutoApi.DoorsState{locks: []}
iex> state = %AutoApi.HoodState{position: %AutoApi.Property{data: :intermediate}}
iex> AutoApi.State.clear(state, :position)
%AutoApi.HoodState{position: nil}