Class: Slackdo::Reminder
- Inherits:
-
Object
- Object
- Slackdo::Reminder
- Defined in:
- lib/slackdo.rb
Instance Method Summary collapse
Instance Method Details
#add_reminder ⇒ Object
169 170 171 172 173 174 175 176 177 178 |
# File 'lib/slackdo.rb', line 169 def add_reminder file = File.read("#{ENV['HOME']}/.slackdo/config.json") hash = JSON.parse(file) webhook = hash['slack_webhook'] notifier = Slack::Notifier.new webhook cli = HighLine.new = cli.ask 'Type your reminder:' notifier.post text: "• _#{message}_" puts 'Reminder was posted to Slack...' end |