Class: CSstats::Parser::Player
- Inherits:
-
Object
- Object
- CSstats::Parser::Player
- Defined in:
- lib/csstats/parser/player.rb
Constant Summary collapse
- DATA_COLUMNS =
%w( teamkill damage deaths kills shots hits headshots defusions defused plants explosions - head chest stomach leftarm rightarm leftleg rightleg - ).freeze
Instance Method Summary collapse
-
#parse(handler) ⇒ Object
Internal: Parse player information from file.
Instance Method Details
#parse(handler) ⇒ Object
Internal: Parse player information from file.
handler - The File which was opened for reading data.
Returns The Mash of player information.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/csstats/parser/player.rb', line 17 def parse(handler) length = handler.read_short_data return if length.zero? player_data = Hashie::Mash.new player_data.nick = handler.read_string_data(length) add_data(player_data, handler) player_data end |