Class: CreateTask::Reminders

Inherits:
Helper
  • Object
show all
Defined in:
lib/create_task/reminders.rb

Overview

Creates a task in Reminders for Mac

Class Method Summary collapse

Methods inherited from Helper

#default_parsed_date, new_task, #parse_date

Class Method Details

.create(args) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/create_task/reminders.rb', line 5

def self.create(args)
  name = args[:name]
  `osascript <<'APPLESCRIPT'
     set d_date to date "#{args[:due_date]}"
     tell application "Reminders" to show
     (make new reminder with properties {name:"#{name}", due date:(d_date)})
     APPLESCRIPT`
end