Sha256: 81c11ec006cae34ba47f56574023b28d6ff0576e625ab0caf8581a0c0f5c6633
Contents?: true
Size: 442 Bytes
Versions: 16
Compression:
Stored size: 442 Bytes
Contents
# frozen_string_literal: true 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
16 entries across 16 versions & 1 rubygems