Objetc oriented programming concepts based ruby codes