Class: CSstats::Parser::Reader::Player

Inherits:
Object
  • Object
show all
Defined in:
lib/csstats/parser/reader/player.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stream) ⇒ Player

Returns a new instance of Player.



9
10
11
# File 'lib/csstats/parser/reader/player.rb', line 9

def initialize(stream)
  @stream = stream
end

Instance Attribute Details

#streamObject (readonly)

Returns the value of attribute stream.



7
8
9
# File 'lib/csstats/parser/reader/player.rb', line 7

def stream
  @stream
end

Instance Method Details

#parseObject



13
14
15
16
17
18
19
# File 'lib/csstats/parser/reader/player.rb', line 13

def parse
  player = CSstats::Player.new
  parse_columns(player)
  return unless player.nick

  player
end