class SayWhen::Triggers::OnceStrategy
Attributes
once_at[RW]
Public Class Methods
new(options = nil)
click to toggle source
Calls superclass method
SayWhen::Triggers::Base::new
# File lib/say_when/triggers/once_strategy.rb, line 12 def initialize(options = nil) super self.once_at = options[:at] || Time.now end
Public Instance Methods
next_fire_at(time = nil)
click to toggle source
# File lib/say_when/triggers/once_strategy.rb, line 17 def next_fire_at(time = nil) nfa = once_at if (!time || (time <= once_at)) nfa end