Sha256: e62ad20d7d119ecfd730826f4e9afb7cf3e67bb5a6d0f79c389414d11373a7a3

Contents?: true

Size: 453 Bytes

Versions: 9

Compression:

Stored size: 453 Bytes

Contents

require 'say_when/triggers/base'
require 'say_when/cron_expression'

module SayWhen
  module Triggers
    class CronStrategy

      include SayWhen::Triggers::Base

      attr_accessor :cron_expression

      def initialize(options={})
        super
        @cron_expression = SayWhen::CronExpression.new(options)            
      end

      def next_fire_at(time=nil)
        cron_expression.next_fire_at(time || Time.now)
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
say_when-0.4.1 lib/say_when/triggers/cron_strategy.rb
say_when-0.4.0 lib/say_when/triggers/cron_strategy.rb
say_when-0.3.0 lib/say_when/triggers/cron_strategy.rb
say_when-0.2.6 lib/say_when/triggers/cron_strategy.rb
say_when-0.2.5 lib/say_when/triggers/cron_strategy.rb
say_when-0.2.4 lib/say_when/triggers/cron_strategy.rb
say_when-0.2.3 lib/say_when/triggers/cron_strategy.rb
say_when-0.2.1 lib/say_when/triggers/cron_strategy.rb
say_when-0.2.0 lib/say_when/triggers/cron_strategy.rb