This work presents an analytical treatment of an asymmetric metamaterial-based resonator excited by an electric line source, and explores its beam shaping capabilities. The resonator consists of two concentric cylindrical material layers covered with an infinitely thin conducting shell with an aperture. Exact analytical solution of the problem is derived; it is based on the n-series approach which is casted into the equivalent Riemann-Hilbert problem. The examined configuration leads to large enhancements of the radiated field and to steerable Huygens-like directivity patterns. Particularly, the directivities can be reshaped by changing the source location, as well as the extent of the aperture. The present results may provide alternative strategies for beam shaping and may contribute to development of novel nano-antenna designs.