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
| ### Keybase proof | |
| I hereby claim: | |
| * I am math3v on github. | |
| * I am matejminarik (https://keybase.io/matejminarik) on keybase. | |
| * I have a public key ASBTt2BpuSwhJNg9XTj7hvYRcTCBIe0pR2sZidTHn4yqXwo | |
| To claim this, I am signing this object: |
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
| 0x004e143291e37AE6c932e9c82640c9959659878C |
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
| class NotificationSender | |
| def send(user, message, sender = EmailSender.new) | |
| sender.send(user, message) if user.active? | |
| end | |
| end | |
| class EmailSender | |
| def send(user, message) | |
| # send email | |
| end |
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
| class UsageFileParser | |
| def initialize(client, parser) | |
| @client = client | |
| @parser = parser | |
| end | |
| def parse(usage_file) | |
| parser.parse(usage_file) | |
| @client.last_parse = Time.now | |
| @client.save! |