Method: Omnes::Subscription#initialize

Defined in:
lib/omnes/subscription.rb

#initialize(matcher:, callback:, id:) ⇒ Subscription

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Subscription.



41
42
43
44
45
46
47
# File 'lib/omnes/subscription.rb', line 41

def initialize(matcher:, callback:, id:)
  raise Omnes::InvalidSubscriptionNameError.new(id: id) unless id.is_a?(Symbol)

  @matcher = matcher
  @callback = callback
  @id = id
end