Sha256: 28f04e2d9f8d815142cbff69f9d433f42447492de19c55e05f0a7839225f3f66

Contents?: true

Size: 289 Bytes

Versions: 2

Compression:

Stored size: 289 Bytes

Contents

# frozen_string_literal: true

module Emittance
  # @private
  class Registration
    attr_reader :event_klass

    def initialize(event_klass, &callback)
      @event_klass = event_klass
      @callback = callback
    end

    def call(event)
      @callback.call event
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
emittance-0.0.4 lib/emittance/registration.rb
emittance-0.0.3 lib/emittance/registration.rb