class Montrose::Rule::DayOfWeek
Public Class Methods
Source
# File lib/montrose/rule/day_of_week.rb, line 8 def self.apply_options(opts) opts[:day] end
Source
# File lib/montrose/rule/day_of_week.rb, line 16 def initialize(days) @days = days end
Initializes rule
@param [Array<Fixnum>] days - valid days of week, e.g. [1, 2, 7]
Public Instance Methods
Source
# File lib/montrose/rule/day_of_week.rb, line 20 def include?(time) @days.include?(time.wday) end