Sha256: ac2c5382bf4902bd55a34cf1e3defcff9c9754bf33656f240a0cb43a48bbbe7d
Contents?: true
Size: 712 Bytes
Versions: 22
Compression:
Stored size: 712 Bytes
Contents
# frozen_string_literal: true require 'parse-cron' module TasksScheduler module CronParserPatch class TasksSchedulerTimeSource class << self def local(year, month, day, hour, min, second) # rubocop:disable Metrics/ParameterLists Time.utc(year, month, day, hour, min, second) end def now Time.now.utc end end end def self.included(base) base.class_eval do def self.new(source, time_source = TasksSchedulerTimeSource) super end end end end end unless ::CronParser.included_modules.include?(::TasksScheduler::CronParserPatch) ::CronParser.include(::TasksScheduler::CronParserPatch) end
Version data entries
22 entries across 22 versions & 1 rubygems