Class: Protobuf::Nats::JNats::Message

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(nats_message) ⇒ Message

Returns a new instance of Message.



16
17
18
19
20
# File 'lib/protobuf/nats/jnats.rb', line 16

def initialize(nats_message)
  @data = nats_message.getData.to_s
  @reply = nats_message.getReplyTo.to_s
  @subject = nats_message.getSubject
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



14
15
16
# File 'lib/protobuf/nats/jnats.rb', line 14

def data
  @data
end

#replyObject (readonly)

Returns the value of attribute reply.



14
15
16
# File 'lib/protobuf/nats/jnats.rb', line 14

def reply
  @reply
end

#subjectObject (readonly)

Returns the value of attribute subject.



14
15
16
# File 'lib/protobuf/nats/jnats.rb', line 14

def subject
  @subject
end