class OpenRAReplay::Order

Constants

CLIENT_COMMAND
SERVER_COMMAND
SPECIAL_COMMAND

Attributes

command[R]
data[R]

Public Class Methods

construct(input) click to toggle source
# File lib/openrareplay/order/order.rb, line 39
def self.construct(input)
  char = input.read(1)
  case char
  when SERVER_COMMAND
    return ServerOrder.construct(input)
  when CLIENT_COMMAND
    return ClientOrder.construct(input)
  else
    return NotAnOrder.construct(input, char, char == SPECIAL_COMMAND)
  end
end
new(hash = {}) click to toggle source
# File lib/openrareplay/order/order.rb, line 34
def initialize(hash = {})
  @command = hash[:command] || ''
  @data = hash[:data] || ''
end

Public Instance Methods

client_order?() click to toggle source
# File lib/openrareplay/order/order.rb, line 63
def client_order?
  false
end
Also aliased as: is_ff?
is_fe?()
Alias for: server_order?
is_ff?()
Alias for: client_order?
order?() click to toggle source
# File lib/openrareplay/order/order.rb, line 75
def order?
  true
end
serialize() click to toggle source
# File lib/openrareplay/order/order.rb, line 51
def serialize
  ''
end
server_order?() click to toggle source
# File lib/openrareplay/order/order.rb, line 59
def server_order?
  false
end
Also aliased as: is_fe?
special_command?() click to toggle source
# File lib/openrareplay/order/order.rb, line 71
def special_command?
  false
end
to_s() click to toggle source
# File lib/openrareplay/order/order.rb, line 55
def to_s
  "<#{self.class.name} command: #{command} data: #{data}>"
end
unknown?() click to toggle source
# File lib/openrareplay/order/order.rb, line 67
def unknown?
  false
end