Sha256: 9d7ad37dd6cdbfeab61f7222afabc95b2a038a2f6646ad149615956111f17f0b

Contents?: true

Size: 297 Bytes

Versions: 2

Compression:

Stored size: 297 Bytes

Contents

# @api private

module Wisper
  class Registration
    attr_reader :on, :listener

    def initialize(listener, **options)
      @listener = listener
      @on = ValueObjects::Events.new options[:on]
    end

    private

    def should_broadcast?(event)
      on.include? event
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
wisper-3.0.0.rc1 lib/wisper/registration/registration.rb
wisper-compat-4.0.0 lib/wisper/registration/registration.rb