class Montrose::Rule::MonthOfYear

Public Class Methods

apply_options(opts) click to toggle source
# File lib/montrose/rule/month_of_year.rb, line 8
def self.apply_options(opts)
  opts[:month]
end
new(months) click to toggle source

Initializes rule

@param [Array] months - valid month numbers

# File lib/montrose/rule/month_of_year.rb, line 16
def initialize(months)
  @months = months
end

Public Instance Methods

include?(time) click to toggle source
# File lib/montrose/rule/month_of_year.rb, line 20
def include?(time)
  @months.include?(time.month)
end