Last active
August 15, 2018 11:53
-
-
Save rachidcalazans/910190d0034550d01bfa99ca7dd0eae8 to your computer and use it in GitHub Desktop.
Example I for the Post - Design Patterns in Ruby - Strategy - Part I
This file contains hidden or 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
| Notification = Struct.new(:notifier_strategy, :receivers, :subject_msg, :content_msg) do | |
| def notify | |
| # The Notifier Strategy will be Email or iOS. | |
| notifier_strategy.notify(self) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment