We generalize the small object argument in order to allow for its application to proper classes of maps (as opposed to sets of maps in Quillen's small object argument). The necessity of such a generalization arose with appearance of several important examples of model categories which were proven to be non-cofibrantly generated [J. Adámek, H. Herrlich, J. Rosický, W. Tholen, Weak factorization systems and topological functors, Appl. Categ. Structures 10 (3) (2002) 237–249 [2]; Papers in honour of the seventieth birthday of Professor Heinrich Kleisli (Fribourg, 2000); B. Chorny, The model category of maps of spaces is not cofibrantly generated, Proc. Amer. Math. Soc. 131 (2003) 2255–2259; J.D. Christensen, M. Hovey, Quillen model structures for relative homological algebra, Math. Proc. Cambridge Philos. Soc. 133 (2) (2002) 261–293; D.C. Isaksen, A model structure on the category of pro-simplicial sets, Trans. Amer. Math. Soc. 353 (2001) 2805–2841]. Our current approach allows for construction of functorial factorizations and localizations in the equivariant model structures on diagrams of spaces [E.D. Farjoun, Homotopy theories for diagrams of spaces, Proc. Amer. Math. Soc. 101 (1987) 181–189] and diagrams of chain complexes. We also formulate a non-functorial version of the argument, which applies in two different model structures on the category of pro-spaces [D.A. Edwards, H.M. Hastings, Čech and Steenrod homotopy theories with applications to geometric topology, Lecture Notes in Mathematics, vol. 542, Springer, Berlin, 1976; D.C. Isaksen, A model structure on the category of pro-simplicial sets, Trans. Amer. Math. Soc. 353 (2001) 2805–2841]. The examples above suggest a natural extension of the framework of cofibrantly generated model categories. We introduce the concept of a class-cofibrantly generated model category, which is a model category generated by classes of cofibrations and trivial cofibrations satisfying some reasonable assumptions.