Sha256: 51a31cc2b7f16f3ed1d9406262aa272fb52b309cc4cd5d55aefa19704a52bba9

Contents?: true

Size: 324 Bytes

Versions: 2

Compression:

Stored size: 324 Bytes

Contents

module Cronjobs
  class Definitions

    def each
      registry.each do |time, actions|
        actions.each do |action|
          yield time, action
        end
      end
    end

    def add(time, actions)
      registry << [time, actions]
    end

    private

    def registry
      @registry ||= []
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cronjobs-4.0.0.1 lib/cronjobs/definitions.rb
cronjobs-4.0.0.0 lib/cronjobs/definitions.rb