Class: Cronex::MinutesDescription
Instance Attribute Summary
Attributes inherited from Description
#options, #resources
Instance Method Summary
collapse
Methods inherited from Description
#initialize, #plural, #segment_description, #special_chars
Instance Method Details
11
12
13
|
# File 'lib/cronex/description/minutes.rb', line 11
def between_description_format(expression)
resources.get('minutes_through_past_the_hour')
end
|
15
16
17
|
# File 'lib/cronex/description/minutes.rb', line 15
def description_format(expression)
expression == '0' ? '' : [resources.get('at_x'), min_plural(expression), resources.get('past_the_hour')].join(' ')
end
|
7
8
9
|
# File 'lib/cronex/description/minutes.rb', line 7
def interval_description_format(expression)
format(resources.get('every_x') + ' ' + min_plural(expression), expression)
end
|
#min_plural(expression) ⇒ Object
23
24
25
|
# File 'lib/cronex/description/minutes.rb', line 23
def min_plural(expression)
plural(expression, resources.get('minute'), resources.get('minutes'))
end
|
#single_item_description(expression) ⇒ Object
3
4
5
|
# File 'lib/cronex/description/minutes.rb', line 3
def single_item_description(expression)
Cronex::Utils.format_minutes(expression)
end
|
19
20
21
|
# File 'lib/cronex/description/minutes.rb', line 19
def starting_description_format(expression)
resources.get('starting') + ' ' + description_format(expression)
end
|