Class: Doom::Net::GameServer::Member

Inherits:
Struct
  • Object
show all
Defined in:
lib/doom/net/game_server.rb

Overview

A connected client's bookkeeping (named Member so it is not confused with Net::Client, the actual client program in the same module).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hostObject

Returns the value of attribute host



33
34
35
# File 'lib/doom/net/game_server.rb', line 33

def host
  @host
end

#joinedObject

Returns the value of attribute joined



33
34
35
# File 'lib/doom/net/game_server.rb', line 33

def joined
  @joined
end

#last_seenObject

Returns the value of attribute last_seen



33
34
35
# File 'lib/doom/net/game_server.rb', line 33

def last_seen
  @last_seen
end

#player_idObject

Returns the value of attribute player_id



33
34
35
# File 'lib/doom/net/game_server.rb', line 33

def player_id
  @player_id
end

#portObject

Returns the value of attribute port



33
34
35
# File 'lib/doom/net/game_server.rb', line 33

def port
  @port
end

Instance Method Details

#keyObject



34
# File 'lib/doom/net/game_server.rb', line 34

def key = "#{host}:#{port}"