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



10
11
12
# File 'lib/protobuf/nats/client.rb', line 10

def inbox
  @inbox
end

#subscriptionObject

Returns the value of attribute subscription

Returns:

  • (Object)

    the current value of subscription



10
11
12
# File 'lib/protobuf/nats/client.rb', line 10

def subscription
  @subscription
end

Instance Method Details

#swap(sub_inbox) ⇒ Object



11
12
13
14
# File 'lib/protobuf/nats/client.rb', line 11

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