class Montrose::Rule::MonthOfYear
Public Class Methods
Source
# File lib/montrose/rule/month_of_year.rb, line 8 def self.apply_options(opts) opts[:month] end
Source
# File lib/montrose/rule/month_of_year.rb, line 16 def initialize(months) @months = months end
Initializes rule
@param [Array] months - valid month numbers
Public Instance Methods
Source
# File lib/montrose/rule/month_of_year.rb, line 20 def include?(time) @months.include?(time.month) end