Class: Cogibara::Message
- Inherits:
-
Object
- Object
- Cogibara::Message
- Defined in:
- lib/cogibara/message.rb
Instance Attribute Summary collapse
-
#clientID ⇒ Object
readonly
Returns the value of attribute clientID.
-
#structure ⇒ Object
Returns the value of attribute structure.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #become_clone!(msg) ⇒ Object
-
#initialize(text = "", clientID = -1,, structure = Hash.new) ⇒ Message
constructor
A new instance of Message.
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
#clientID ⇒ Object (readonly)
Returns the value of attribute clientID.
5 6 7 |
# File 'lib/cogibara/message.rb', line 5 def clientID @clientID end |
#structure ⇒ Object
Returns the value of attribute structure.
4 5 6 |
# File 'lib/cogibara/message.rb', line 4 def structure @structure end |
#text ⇒ Object (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 |