Class: TabKeeper::Monthly

Inherits:
Object
  • Object
show all
Defined in:
lib/tab_keeper/monthly.rb

Constant Summary collapse

MINUTE_VALUES =
(0..59)
HOUR_VALUES =
(0..23)
DAY_VALUES =

Cron supports 29-31 too, but that’s a recipe for sadness

(0..28)

Instance Method Summary collapse

Constructor Details

#initialize(day: nil, hour: nil, min: 0) ⇒ Monthly

Returns a new instance of Monthly.



8
9
10
11
12
13
# File 'lib/tab_keeper/monthly.rb', line 8

def initialize(day: nil, hour: nil, min: 0)
  @day = day
  @hour = hour
  @min = min
  verify!
end

Instance Method Details

#to_sObject



15
16
17
# File 'lib/tab_keeper/monthly.rb', line 15

def to_s
  "#{min} #{hour} #{day} * *"
end