Sha256: 45305a079ebf80092f10de141398a230e6d35783e0c33800c1a6b660d226a3b2

Contents?: true

Size: 625 Bytes

Versions: 1

Compression:

Stored size: 625 Bytes

Contents

module Pipio
  # 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.
  class Message
    include Comparable

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

    attr_reader :sender_screen_name, :time, :sender_alias

    private

    def adium_formatted_time
      @time.xmlschema
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pipio-0.0.1 lib/pipio/messages/message.rb