class Cron::Parser::DayOfMonthField

Public Class Methods

allowed_special_characters() click to toggle source
# File lib/cron/parser/day_of_month_field.rb, line 6
def self.allowed_special_characters; %w{ * / , - }             end
allowed_values() click to toggle source
# File lib/cron/parser/day_of_month_field.rb, line 3
def self.allowed_values; ("1".."9").to_a + ("01".."31").to_a   end
generate_meaning(list, unit) click to toggle source

Creates partial meaning (sentence) for the day of month field’s pattern.

# File lib/cron/parser/day_of_month_field.rb, line 12
def self.generate_meaning(list, unit)
  meaning = ""
  meaning += self.field_preposition(unit)
  meaning += " days: "
  meaning += list.map(&:to_s).map(&:ordinalize).join(", ")
  meaning
end
lower_bound() click to toggle source
# File lib/cron/parser/day_of_month_field.rb, line 5
def self.lower_bound;                self.allowed_values.first end
specifications() click to toggle source
Calls superclass method
# File lib/cron/parser/day_of_month_field.rb, line 7
def self.specifications
  super
end
upper_bound() click to toggle source
# File lib/cron/parser/day_of_month_field.rb, line 4
def self.upper_bound;                self.allowed_values.last  end