Attendance upon any class shall not be obligatory, but where there is a day or evening school maintained by a city or town in accordance with the provisions of this chapter, no resident of the city or town under twenty-one (21) years of age shall be allowed to attend any class except by permission of the superintendent of schools of the city or town.
R.I. Gen. Laws § 16-29-13