Class: Sculd::Plan::Reminder

Inherits:
Sculd::Plan show all
Defined in:
lib/sculd/plan/reminder.rb

Constant Summary collapse

SYMBOL_CHAR =
"-"

Constants inherited from Sculd::Plan

DEADLINE_PRIORITY, REMINDER_PRIORITY

Instance Attribute Summary

Attributes inherited from Sculd::Plan

#datetime, #description, #flag_time, #option

Instance Method Summary collapse

Methods inherited from Sculd::Plan

#initialize, parse, wday

Constructor Details

This class inherits a constructor from Sculd::Plan

Instance Method Details

#event_datesObject



24
25
26
# File 'lib/sculd/plan/reminder.rb', line 24

def event_dates
  [Date.new(@datetime.year, @datetime.month, @datetime.day)]
end

#priority(today = Date.now) ⇒ Object

value of @option does not work



15
16
17
18
19
20
21
22
# File 'lib/sculd/plan/reminder.rb', line 15

def priority(today = Date.now)
  if today < @datetime
    return 0
  else
    #@option = 1 if @option < 1
    return Sculd::Plan::REMINDER_PRIORITY - (today - @datetime) #/@option
  end
end