Sha256: aa6db686e937568b9ebc59d1eef29711c05853da5bb6fe5805f471f024c38b25

Contents?: true

Size: 413 Bytes

Versions: 4

Compression:

Stored size: 413 Bytes

Contents

module Cronjobber
  module TasksHelper
    
    def execute_cronjob_tasks tasks=nil
      tasks = Array(tasks) + Cronjobber.tasks
      tasks.map! do |task|
        if task.is_a? String
          task = task.camelize.constantize
        else
          task
        end
      end      
      tasks.map! do |task|
        task.cronjob_perform
      end
      return tasks, tasks.map(&:format)
    end
    
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cronjobber-1.1.1 lib/cronjobber/tasks_helper.rb
cronjobber-1.1.0 lib/cronjobber/tasks_helper.rb
cronjobber-1.0.2 lib/cronjobber/tasks_helper.rb
cronjobber-1.0.1 lib/cronjobber/tasks_helper.rb