Class: Protobuf::Nats::Client::SubscriptionInbox

Inherits:
Struct
  • Object
show all
Defined in:
lib/protobuf/nats/client.rb

Overview

Structure to hold subscription and inbox to use within pool

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#inboxObject

Returns the value of attribute inbox

Returns:

  • (Object)

    the current value of inbox



20
21
22
# File 'lib/protobuf/nats/client.rb', line 20

def inbox
  @inbox
end

#subscriptionObject

Returns the value of attribute subscription

Returns:

  • (Object)

    the current value of subscription



20
21
22
# File 'lib/protobuf/nats/client.rb', line 20

def subscription
  @subscription
end

Instance Method Details

#swap(sub_inbox) ⇒ Object



21
22
23
24
# File 'lib/protobuf/nats/client.rb', line 21

def swap(sub_inbox)
  self.subscription = sub_inbox.subscription
  self.inbox = sub_inbox.inbox
end