Class: Crony::Formatters::YearFormatter

Inherits:
CronStruct
  • Object
show all
Defined in:
lib/crony/formatters/year_formatter.rb

Instance Method Summary collapse

Methods inherited from CronStruct

#collection?, #every?, #format, #frequency?, #range?, #single_element, #single_element?, #sym, #unbounded_range?

Instance Method Details

#cObject



4
5
6
# File 'lib/crony/formatters/year_formatter.rb', line 4

def c
  "in #{collection.to_sentence}"
end

#eObject



8
9
10
# File 'lib/crony/formatters/year_formatter.rb', line 8

def e
  ''
end

#fObject



12
13
14
# File 'lib/crony/formatters/year_formatter.rb', line 12

def f
  "#{v} between #{start} and #{stop}"
end

#rObject



16
17
18
# File 'lib/crony/formatters/year_formatter.rb', line 16

def r
  "every year between #{start} and #{stop}"
end

#sObject



20
21
22
# File 'lib/crony/formatters/year_formatter.rb', line 20

def s
  ", #{single_element}"
end

#uObject



24
25
26
# File 'lib/crony/formatters/year_formatter.rb', line 24

def u
  "#{v} starting in #{start}"
end

#vObject



28
29
30
# File 'lib/crony/formatters/year_formatter.rb', line 28

def v
  "every #{frequency} years"
end