Sha256: 8c240c4565d20a49d90bcfad07265412bb387568e1b739e568934d79b3a140e0

Contents?: true

Size: 276 Bytes

Versions: 15

Compression:

Stored size: 276 Bytes

Contents

# frozen_string_literal: true

module Montrose
  class Frequency
    class Hourly < Frequency
      def include?(time)
        matches_interval?((time - @starts) / 1.hour)
      end

      def to_cron
        "#{@starts.min} #{interval_str} * * *"
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
montrose-0.18.0 lib/montrose/frequency/hourly.rb
montrose-0.17.0 lib/montrose/frequency/hourly.rb
montrose-0.16.0 lib/montrose/frequency/hourly.rb
montrose-0.15.0 lib/montrose/frequency/hourly.rb
montrose-0.14.0 lib/montrose/frequency/hourly.rb
montrose-0.13.0 lib/montrose/frequency/hourly.rb
montrose-0.12.0 lib/montrose/frequency/hourly.rb
montrose-0.11.2 lib/montrose/frequency/hourly.rb
montrose-0.11.1 lib/montrose/frequency/hourly.rb
montrose-0.11.0 lib/montrose/frequency/hourly.rb
montrose-0.10.1 lib/montrose/frequency/hourly.rb
montrose-0.10.0 lib/montrose/frequency/hourly.rb
montrose-0.9.0 lib/montrose/frequency/hourly.rb
montrose-0.8.2 lib/montrose/frequency/hourly.rb
montrose-0.8.1 lib/montrose/frequency/hourly.rb