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.



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

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.



19
20
21
# File 'lib/protobuf/nats/jnats.rb', line 19

def data
  @data
end

#replyObject (readonly)

Returns the value of attribute reply.



19
20
21
# File 'lib/protobuf/nats/jnats.rb', line 19

def reply
  @reply
end

#subjectObject (readonly)

Returns the value of attribute subject.



19
20
21
# File 'lib/protobuf/nats/jnats.rb', line 19

def subject
  @subject
end