Class: Overlook::Csgo::MatchInfoDecoder

Inherits:
Object
  • Object
show all
Includes:
SteamIDs
Defined in:
lib/overlook/csgo/match_info_decoder.rb

Instance Method Summary collapse

Constructor Details

#initializeMatchInfoDecoder

Returns a new instance of MatchInfoDecoder.



8
9
# File 'lib/overlook/csgo/match_info_decoder.rb', line 8

def initialize
end

Instance Method Details

#decode(io) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/overlook/csgo/match_info_decoder.rb', line 11

def decode(io)
  match = CDataGCCStrike15_v2_MatchInfo.decode(io.read)

  decoded = {}
  decoded.merge!(extract_match_meta(match))
  decoded.merge!(extract_replay_info(match))
  decoded.merge!(extract_stats(match))
  decoded.merge!(extract_end_results(match))
  decoded
end