Class: Minecraft::MessageQueue::Message::Err

Inherits:
Minecraft::MessageQueue::Message show all
Defined in:
lib/minecraft.rb

Instance Attribute Summary collapse

Attributes inherited from Minecraft::MessageQueue::Message

#msg

Instance Method Summary collapse

Methods inherited from Minecraft::MessageQueue::Message

#to_s

Constructor Details

#initialize(line) ⇒ Err

Returns a new instance of Err.



62
63
64
65
66
# File 'lib/minecraft.rb', line 62

def initialize(line)
	x, @time, @level, msg = *line.match(/^([^ ]* [^ ]*) \[([^\]]*)\] (.*)/)
	msg = line unless @time and @level and msg
	super(msg)
end

Instance Attribute Details

#levelObject (readonly)

Returns the value of attribute level.



68
69
70
# File 'lib/minecraft.rb', line 68

def level
  @level
end

#timeObject (readonly)

Returns the value of attribute time.



68
69
70
# File 'lib/minecraft.rb', line 68

def time
  @time
end