Class: Cronjobs::Definitions

Inherits:
Object
  • Object
show all
Defined in:
lib/cronjobs/definitions.rb

Instance Method Summary collapse

Instance Method Details

#add(time, actions) ⇒ Object



12
13
14
# File 'lib/cronjobs/definitions.rb', line 12

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

#eachObject



4
5
6
7
8
9
10
# File 'lib/cronjobs/definitions.rb', line 4

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