Class: Af::QThread::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/fiksu-af/q_thread/message.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, from = Thread.current) ⇒ Message

Returns a new instance of Message.



4
5
6
7
8
# File 'lib/fiksu-af/q_thread/message.rb', line 4

def initialize(data, from = Thread.current)
  @from = from
  @data = data
  @msg_id = self.class.new_msg_id
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



3
4
5
# File 'lib/fiksu-af/q_thread/message.rb', line 3

def data
  @data
end

#fromObject

Returns the value of attribute from.



3
4
5
# File 'lib/fiksu-af/q_thread/message.rb', line 3

def from
  @from
end

#msg_idObject

Returns the value of attribute msg_id.



3
4
5
# File 'lib/fiksu-af/q_thread/message.rb', line 3

def msg_id
  @msg_id
end

Class Method Details

.new_msg_idObject



10
11
12
# File 'lib/fiksu-af/q_thread/message.rb', line 10

def self.new_msg_id
  return UUID.new
end