Sha256: 979edb540af203215c8ad96dba848d7937d02868fa92a26a93b2b05ca6177290
Contents?: true
Size: 411 Bytes
Versions: 10
Compression:
Stored size: 411 Bytes
Contents
module Montrose module Rule class HourOfDay include Montrose::Rule def self.apply_options(opts) opts[:hour] end # Initializes rule # # @param hours [Array<Fixnum>] valid hours of days, e.g. [1, 2, 24] # def initialize(hours) @hours = hours end def include?(time) @hours.include?(time.hour) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems