Class: Pipio::Message

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/pipio/messages/message.rb

Overview

A holding object for each line of the chat. It is subclassed as appropriate (eg AutoReplyMessage). Each subclass (but not Message itself) has its own to_s which prints out its information in a format appropriate for putting in an Adium log file.

Direct Known Subclasses

StatusMessage, XMLMessage

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sender_screen_name, time, sender_alias) ⇒ Message

Returns a new instance of Message.



9
10
11
12
13
# File 'lib/pipio/messages/message.rb', line 9

def initialize(sender_screen_name, time, sender_alias)
  @sender_screen_name = sender_screen_name
  @time = time
  @sender_alias = sender_alias
end

Instance Attribute Details

#sender_aliasObject (readonly)

Returns the value of attribute sender_alias.



15
16
17
# File 'lib/pipio/messages/message.rb', line 15

def sender_alias
  @sender_alias
end

#sender_screen_nameObject (readonly)

Returns the value of attribute sender_screen_name.



15
16
17
# File 'lib/pipio/messages/message.rb', line 15

def sender_screen_name
  @sender_screen_name
end

#timeObject (readonly)

Returns the value of attribute time.



15
16
17
# File 'lib/pipio/messages/message.rb', line 15

def time
  @time
end