class Slackdo::Reminder

Public Instance Methods

add_reminder() click to toggle source
# File lib/slackdo.rb, line 213
  def add_reminder
    file = File.read("#{ENV['HOME']}/.slackdo/config.json")
hash = JSON.parse(file)
webhook = hash['slack_webhook']
notifier = Slack::Notifier.new webhook
message = $prompt.ask('Type your reminder:')
notifier.post text: "• _#{message}_"
    puts 'Reminder was posted to Slack...'
  end