Sha256: 53c99589ab3eb93430230ee2dec4ee54fa302df2a783a3a4fd03cd1da12dbc9c

Contents?: true

Size: 314 Bytes

Versions: 11

Compression:

Stored size: 314 Bytes

Contents

require 'active_support/core_ext/class/attribute'

module Delayed
  class Plugin
    class_attribute :callback_block

    def self.callbacks(&block)
      self.callback_block = block
    end

    def initialize
      self.class.callback_block.call(Delayed.lifecycle) if self.class.callback_block
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
delayed-0.5.5 lib/delayed/plugin.rb
delayed-0.5.4 lib/delayed/plugin.rb
delayed-0.5.3 lib/delayed/plugin.rb
delayed-0.5.2 lib/delayed/plugin.rb
delayed-0.5.1 lib/delayed/plugin.rb
delayed-0.5.0 lib/delayed/plugin.rb
delayed-0.4.0 lib/delayed/plugin.rb
delayed-0.3.0 lib/delayed/plugin.rb
delayed-0.2.0 lib/delayed/plugin.rb
delayed-0.1.1 lib/delayed/plugin.rb
delayed-0.1.0 lib/delayed/plugin.rb