class Sidekiq::Repeat::MiniIceCube::CronSyntax

Public Class Methods

define_items_method(name, slot) click to toggle source
# File lib/sidekiq/repeat/mini_ice_cube.rb, line 25
def define_items_method(name, slot)
  define_method(name) do |*args|
    unsupported("invalid arguments for #{name}") unless args.any? && args.all? { |i| i.is_a?(Integer) || i =~ /\d+/ }
    @slots[slot] = args.map(&:to_s).join(',')
    self
  end
end
new(*args) click to toggle source
# File lib/sidekiq/repeat/mini_ice_cube.rb, line 34
def initialize(*args)
  @slots = args
end

Public Instance Methods

to_s() click to toggle source
# File lib/sidekiq/repeat/mini_ice_cube.rb, line 38
def to_s
  @slots.map(&:to_s).join(' ')
end