Created
May 7, 2013 05:51
-
-
Save BrayanZ/5530514 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SMSNotification < Notification | |
def send | |
# sends a sms notification | |
end | |
end | |
class EmailNotification < Notification | |
def send | |
# sends an email with the notification | |
end | |
end | |
class PushNotification < Notification | |
def send | |
# sends a push notification | |
end | |
end | |
class Notification | |
def send | |
# | |
end | |
def self.send_notifications notifications_to_send | |
notifications_to_send.each { |notification| notification.send } | |
end | |
# ... | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment