Straight answer: they did it by manipulating the legal definition of the device. This is an old DemocRat trick not entirely limited to Kalibanfornia. Out here a dirk or dagger is "any object that can cause serious bodily injury or death" and a gun is loaded if there are "any cartrige cases in the immediate vicinity" (note that they needn't be live, loaded, assembled, or the correct caliber to fit the firearm, and the firearm need not be assembled. There are plenty more, enough to make everyone a criminal except state employees. Hope this helps.
This is total insanity.
Ergo, it makes total sense in the backwards communist state of Kalifornistan.
Otherwise, possesion of a potato, a pipe, and a bic lighter is a felony.
This is the first characteristic of a totalitarian government - the second is Auschwitz.