Class: Cogibara::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/cogibara/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text = "", clientID = -1,, structure = Hash.new) ⇒ Message

Returns a new instance of Message.



7
8
9
10
11
# File 'lib/cogibara/message.rb', line 7

def initialize(text="", clientID=-1,structure=Hash.new)
  @text = text
  @structure = structure
  @clientID = clientID
end

Instance Attribute Details

#clientIDObject (readonly)

Returns the value of attribute clientID.



5
6
7
# File 'lib/cogibara/message.rb', line 5

def clientID
  @clientID
end

#structureObject

Returns the value of attribute structure.



4
5
6
# File 'lib/cogibara/message.rb', line 4

def structure
  @structure
end

#textObject (readonly)

Returns the value of attribute text.



3
4
5
# File 'lib/cogibara/message.rb', line 3

def text
  @text
end

Instance Method Details

#become_clone!(msg) ⇒ Object



13
14
15
16
17
18
# File 'lib/cogibara/message.rb', line 13

def become_clone!(msg)
  @text = msg.text
  @structure = msg.structure
  @clientID = msg.clientID

end