The provisions of this chapter shall apply to the respective occupants of lands which have been enclosed with fences for pasturage or grazing purposes.