Class: Crony::Formatters::YearFormatter
- Inherits:
-
CronStruct
- Object
- OpenStruct
- CronStruct
- Crony::Formatters::YearFormatter
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
#c ⇒ Object
4
5
6
|
# File 'lib/crony/formatters/year_formatter.rb', line 4
def c
"in #{collection.to_sentence}"
end
|
#e ⇒ Object
8
9
10
|
# File 'lib/crony/formatters/year_formatter.rb', line 8
def e
''
end
|
#f ⇒ Object
12
13
14
|
# File 'lib/crony/formatters/year_formatter.rb', line 12
def f
"#{v} between #{start} and #{stop}"
end
|
#r ⇒ Object
16
17
18
|
# File 'lib/crony/formatters/year_formatter.rb', line 16
def r
"every year between #{start} and #{stop}"
end
|
#s ⇒ Object
20
21
22
|
# File 'lib/crony/formatters/year_formatter.rb', line 20
def s
", #{single_element}"
end
|
#u ⇒ Object
24
25
26
|
# File 'lib/crony/formatters/year_formatter.rb', line 24
def u
"#{v} starting in #{start}"
end
|
#v ⇒ Object
28
29
30
|
# File 'lib/crony/formatters/year_formatter.rb', line 28
def v
"every #{frequency} years"
end
|