class Faye::Scheduler
Public Class Methods
Source
# File lib/faye/protocol/scheduler.rb, line 4 def initialize(message, options) @message = message @options = options @attempts = 0 end
Public Instance Methods
Source
# File lib/faye/protocol/scheduler.rb, line 18 def deliverable? attempts = @options[:attempts] deadline = @options[:deadline] now = Time.now.to_f return false if attempts and @attempts >= attempts return false if deadline and now > deadline true end
Source
# File lib/faye/protocol/scheduler.rb, line 10 def interval @options[:interval] end