Sha256: 161dfc2ca33125e78998c25b598b473ca26a98334bb329f4db6a5592d5d3550b
Contents?: true
Size: 666 Bytes
Versions: 54
Compression:
Stored size: 666 Bytes
Contents
# frozen_string_literal: true require "rubocop" module RuboCop module Cop module AnyCable # Checks for periodical timers usage. # # @example # # bad # class MyChannel < ApplicationCable::Channel # periodically(:do_something, every: 2.seconds) # end # class PeriodicalTimers < RuboCop::Cop::Cop MSG = "Periodical Timers are not supported in AnyCable" def_node_matcher :calls_periodically?, <<-PATTERN (send _ :periodically ...) PATTERN def on_send(node) add_offense(node) if calls_periodically?(node) end end end end end
Version data entries
54 entries across 54 versions & 2 rubygems