Class: CARPS::StatusReport

Inherits:
Message
  • Object
show all
Defined in:
lib/carps/mod/status_report.rb

Overview

Text sent by the server to be viewed on the client.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Message

#crypt, #crypt=, #delete, #from, #from=, #parse, #path=, #save, #session, #session=

Constructor Details

#initialize(text) ⇒ StatusReport

Create a status report



29
30
31
# File 'lib/carps/mod/status_report.rb', line 29

def initialize text
   @text = text
end

Class Method Details

.parse(blob) ⇒ Object

Parse from the void



34
35
36
37
# File 'lib/carps/mod/status_report.rb', line 34

def StatusReport.parse blob
   status, blob = find K.status_report, blob
   [StatusReport.new(status), blob]
end

Instance Method Details

#displayObject

Display the text



45
46
47
# File 'lib/carps/mod/status_report.rb', line 45

def display
   puts @text
end

#emitObject

Emit



40
41
42
# File 'lib/carps/mod/status_report.rb', line 40

def emit
   V.status_report @text
end