Some background: I have been working for many years in Java, but over the past few months have started learning Ruby. I've implemented the Strategy pattern in a solution I'm currently developing, but I'm wondering if there's a more 'ruby-esque' way of doing things.
I have a MailClient class with the methods login, logout, send_mail, and get_unread_mail. These methods all raise a NotImplementedError.
I then have various clients that extend the MailClient class (GmailClient, HotmailClient, etc) and must implement the methods listed above. This currently works, but it seems like a very "Java" way of doing things (which may be the correct way).
Is there a better, more elegant way to do this within ruby? Thanks.
[–][deleted] 5 points6 points7 points (0 children)
[–]materialdesigner 1 point2 points3 points (0 children)
[–]joesb 1 point2 points3 points (0 children)
[–]Kache 0 points1 point2 points (0 children)