Class: CronSpec::MonthFactory

Inherits:
CronSpecificationFactory show all
Defined in:
lib/cron-spec/month_factory.rb

Constant Summary collapse

MonthLowerLimit =
1
MonthUpperLimit =
12
Months =
%w{ jan feb mar apr may jun jul aug sep oct nov dec }
MonthExpression =
Months.join('|')
MonthSingleValuePattern =
/\A(#{MonthExpression}|\d+)\z/
MonthRangePattern =
/\A(#{MonthExpression}|\d+)-(#{MonthExpression}|\d+)\z/
NamedMonthPattern =
/\A(#{MonthExpression})\z/

Constants inherited from CronSpecificationFactory

CronSpecificationFactory::RangePattern, CronSpecificationFactory::SingleValuePattern, CronSpecificationFactory::StepPattern, CronSpecificationFactory::WildcardPattern

Instance Method Summary collapse

Methods inherited from CronSpecificationFactory

#parse

Constructor Details

#initializeMonthFactory

Returns a new instance of MonthFactory.



17
18
19
20
21
22
23
# File 'lib/cron-spec/month_factory.rb', line 17

def initialize
  super
  @lower_limit = MonthLowerLimit
  @upper_limit = MonthUpperLimit
  @single_value_pattern = MonthSingleValuePattern
  @range_pattern = MonthRangePattern
end