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.



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

def initialize(stream)
  @stream = stream
end

Instance Attribute Details

#streamObject (readonly)

Returns the value of attribute stream.



5
6
7
# File 'lib/csstats/parser/reader/player.rb', line 5

def stream
  @stream
end

Instance Method Details

#parseObject



11
12
13
14
15
16
# File 'lib/csstats/parser/reader/player.rb', line 11

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