Sha256: 398b5559a05a08fea2fa555a89f0a9355099420916422d0326a78950bfb6a169

Contents?: true

Size: 308 Bytes

Versions: 20

Compression:

Stored size: 308 Bytes

Contents

module Roqua::Scheduling
  class Task
    attr_reader :name, :options

    def initialize(name, options, callback)
      @name = name
      @options = options
      @callback = callback
    end

    def next_run_at
      options[:next_run_at].call
    end

    def run
      @callback.call
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
roqua-support-0.4.6 lib/roqua/scheduling/task.rb
roqua-support-0.4.5 lib/roqua/scheduling/task.rb
roqua-support-0.4.4 lib/roqua/scheduling/task.rb
roqua-support-0.4.3 lib/roqua/scheduling/task.rb
roqua-support-0.4.2 lib/roqua/scheduling/task.rb
roqua-support-0.4.1 lib/roqua/scheduling/task.rb
roqua-support-0.4.0 lib/roqua/scheduling/task.rb
roqua-support-0.3.5 lib/roqua/scheduling/task.rb
roqua-support-0.3.4 lib/roqua/scheduling/task.rb
roqua-support-0.3.3 lib/roqua/scheduling/task.rb
roqua-support-0.3.2 lib/roqua/scheduling/task.rb
roqua-support-0.3.1 lib/roqua/scheduling/task.rb
roqua-support-0.3.0 lib/roqua/scheduling/task.rb
roqua-support-0.1.34 lib/roqua/scheduling/task.rb
roqua-support-0.1.33 lib/roqua/scheduling/task.rb
roqua-support-0.1.32 lib/roqua/scheduling/task.rb
roqua-support-0.1.31 lib/roqua/scheduling/task.rb
roqua-support-0.1.30 lib/roqua/scheduling/task.rb
roqua-support-0.1.29 lib/roqua/scheduling/task.rb
roqua-support-0.1.28 lib/roqua/scheduling/task.rb