add event once functionality on class

d15b0a1e044f4805eda7374b46a4cf95f10421de I've added .once functionality as per link that you've give on the issue#1.