Module: CronTable

Defined in:
lib/cron-table.rb,
lib/cron-table/engine.rb,
lib/cron-table/context.rb,
lib/cron-table/version.rb,
lib/cron-table/schedule.rb,
lib/cron-table/definition.rb,
app/models/cron_table/item.rb,
lib/cron-table/middlewares.rb,
app/services/cron_table/server.rb,
app/models/cron_table/application_record.rb

Defined Under Namespace

Modules: Schedule Classes: ApplicationRecord, BaseMiddleware, Context, Definition, Engine, Item, Middlewares, Server

Constant Summary collapse

VERSION =
"0.3"
@@all =
nil

Class Method Summary collapse

Class Method Details

.allObject



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/cron-table.rb', line 16

def self.all
  if @@all.nil?
    @@all = {}

    CronTable.preload_dirs.each do |dir|
      Rails.autoloaders.main.eager_load_dir(Rails.root.join(dir))
    end if CronTable.preload_dirs
  end

  @@all
end

.register(middleware) ⇒ Object



28
29
30
# File 'lib/cron-table.rb', line 28

def self.register(middleware)
  Middlewares.include(middleware)
end