Sha256: 4f228cb72dfec7d2a2a46fc85a4a2fa76a9aa8ee8d97274c5eb962c6e4810729

Contents?: true

Size: 485 Bytes

Versions: 11

Compression:

Stored size: 485 Bytes

Contents

# frozen_string_literal: true

module Montrose
  module Rule
    class After
      include Montrose::Rule

      def self.apply_options(opts)
        opts.start_time
      end

      # Initializes rule
      #
      # @param [Time] start_time - lower bound timestamp
      #
      def initialize(start_time)
        @start_time = start_time
      end

      def include?(time)
        time >= @start_time
      end

      def continue?(_time)
        false
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
montrose-0.17.0 lib/montrose/rule/after.rb
montrose-0.16.0 lib/montrose/rule/after.rb
montrose-0.15.0 lib/montrose/rule/after.rb
montrose-0.14.0 lib/montrose/rule/after.rb
montrose-0.13.0 lib/montrose/rule/after.rb
montrose-0.12.0 lib/montrose/rule/after.rb
montrose-0.11.2 lib/montrose/rule/after.rb
montrose-0.11.1 lib/montrose/rule/after.rb
montrose-0.11.0 lib/montrose/rule/after.rb
montrose-0.10.1 lib/montrose/rule/after.rb
montrose-0.10.0 lib/montrose/rule/after.rb