No person shall construct or maintain, in other than a substantial enclosure which is kept securely closed, any spring gun, or any electric wiring designed or intended to injure or shock animals or persons, or any contrivance or apparatus for such purpose. (Prior code § 26.01.047)