In the present paper we consider \(\omega \) -convex functions which generalized many well-known and intensively investigated classes of functions. Among other results, we prove the Jensen inequality for \(\omega \) -convex functions, we examine operations preserving the \(\omega \) -convexity and give several sufficient conditions which guarantee the continuity of such functions. The main result of the paper is a counterpart of a celebrated Hahn-Banach theorem for \(\omega \) -convex functions. Several consequences are also contained in the paper.