Class: ActiveMessaging::Adapters::Kestrel::Message

Inherits:
Struct
  • Object
show all
Defined in:
lib/active_messaging/adapters/kestrel.rb

Overview

Simple struct for wrapping received messages

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



15
16
17
# File 'lib/active_messaging/adapters/kestrel.rb', line 15

def body
  @body
end

#destinationObject

Returns the value of attribute destination

Returns:

  • (Object)

    the current value of destination



15
16
17
# File 'lib/active_messaging/adapters/kestrel.rb', line 15

def destination
  @destination
end

#headersObject

Returns the value of attribute headers

Returns:

  • (Object)

    the current value of headers



15
16
17
# File 'lib/active_messaging/adapters/kestrel.rb', line 15

def headers
  @headers
end

Instance Method Details

#matches_subscription?(subscription) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/active_messaging/adapters/kestrel.rb', line 16

def matches_subscription?(subscription)
  destination.to_s == subscription.destination.value.to_s
end