Sha256: b350bf9a556ac6bba29cb4fccd5373e1bcb3b4ac7255109049c89c531e15e3a5

Contents?: true

Size: 493 Bytes

Versions: 11

Compression:

Stored size: 493 Bytes

Contents

module Eventboss
  module Listener
    ACTIVE_LISTENERS = {}

    def self.included(base)
      base.extend ClassMethods
    end

    def jid
      @jid ||= SecureRandom.uuid
    end

    attr_reader :postponed_by

    def postpone_by(time_in_secs)
      @postponed_by = time_in_secs.to_i
    end

    module ClassMethods
      attr_reader :options

      def eventboss_options(options)
        @options = options.compact

        ACTIVE_LISTENERS[@options] = self
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
eventboss-1.9.1 lib/eventboss/listener.rb
eventboss-1.9.0 lib/eventboss/listener.rb
eventboss-1.8.1 lib/eventboss/listener.rb
eventboss-1.8.0 lib/eventboss/listener.rb
eventboss-1.7.0 lib/eventboss/listener.rb
eventboss-1.5.0 lib/eventboss/listener.rb
eventboss-1.4.1 lib/eventboss/listener.rb
eventboss-1.3.5 lib/eventboss/listener.rb
eventboss-1.3.4 lib/eventboss/listener.rb
eventboss-1.3.3 lib/eventboss/listener.rb
eventboss-1.3.2 lib/eventboss/listener.rb