class Montrose::Rule::TimeOfDay
Public Class Methods
apply_options(opts)
click to toggle source
# File lib/montrose/rule/time_of_day.rb, line 8 def self.apply_options(opts) opts[:at] end
new(times)
click to toggle source
Initializes rule
@param [Array<Time>] times - valid times
# File lib/montrose/rule/time_of_day.rb, line 16 def initialize(times) @times = times end
Public Instance Methods
include?(time)
click to toggle source
# File lib/montrose/rule/time_of_day.rb, line 20 def include?(time) @times.include?(parts(time)) end
Private Instance Methods
parts(time)
click to toggle source
# File lib/montrose/rule/time_of_day.rb, line 26 def parts(time) ::Montrose::TimeOfDay.to_parts(time) end