Sha256: c7631e57c9a10407a2a3b8f3a81c9cb3f83b308053c947726a6f742d73f21abb

Contents?: true

Size: 295 Bytes

Versions: 11

Compression:

Stored size: 295 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

11 entries across 11 versions & 3 rubygems

Version Path
lotrd-0.1.9 vendor/cache/ruby/2.6.0/gems/wisper-2.0.1/lib/wisper/registration/registration.rb
lotrd-0.1.8 vendor/cache/ruby/2.6.0/gems/wisper-2.0.1/lib/wisper/registration/registration.rb
lotrd-0.1.6 vendor/cache/ruby/2.6.0/gems/wisper-2.0.1/lib/wisper/registration/registration.rb
lotrd-0.1.5 vendor/cache/ruby/2.6.0/gems/wisper-2.0.1/lib/wisper/registration/registration.rb
pokedex-terminal-0.2.8 vendor/bundle/ruby/2.7.0/gems/wisper-2.0.1/lib/wisper/registration/registration.rb
pokedex-terminal-0.2.7 vendor/bundle/ruby/2.7.0/gems/wisper-2.0.1/lib/wisper/registration/registration.rb
pokedex-terminal-0.2.6 vendor/bundle/ruby/2.7.0/gems/wisper-2.0.1/lib/wisper/registration/registration.rb
pokedex-terminal-0.2.5 vendor/bundle/ruby/2.7.0/gems/wisper-2.0.1/lib/wisper/registration/registration.rb
pokedex-terminal-0.2.4 vendor/bundle/ruby/2.7.0/gems/wisper-2.0.1/lib/wisper/registration/registration.rb
wisper-2.0.1 lib/wisper/registration/registration.rb
wisper-2.0.0 lib/wisper/registration/registration.rb