lib/emittance/registration.rb in emittance-0.0.1 vs lib/emittance/registration.rb in emittance-0.0.2

- old
+ new

@@ -1,13 +1,17 @@ -# @private -class Emittance::Registration - attr_reader :identifier +# frozen_string_literal: true - def initialize(identifier, &callback) - @identifier = identifier - @callback = callback - end +module Emittance + # @private + class Registration + attr_reader :identifier - def call(event) - @callback.call event + def initialize(identifier, &callback) + @identifier = identifier + @callback = callback + end + + def call(event) + @callback.call event + end end end