Class: TF2LineParser::Player

Inherits:
Object
  • Object
show all
Defined in:
lib/tf2_line_parser/player.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, steam_id, team) ⇒ Player

Returns a new instance of Player.



7
8
9
10
11
# File 'lib/tf2_line_parser/player.rb', line 7

def initialize(name, steam_id, team)
  @name = name
  @steam_id = steam_id
  @team = team
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/tf2_line_parser/player.rb', line 5

def name
  @name
end

#steam_idObject

Returns the value of attribute steam_id.



5
6
7
# File 'lib/tf2_line_parser/player.rb', line 5

def steam_id
  @steam_id
end

#teamObject

Returns the value of attribute team.



5
6
7
# File 'lib/tf2_line_parser/player.rb', line 5

def team
  @team
end

Instance Method Details

#==(other) ⇒ Object



13
14
15
# File 'lib/tf2_line_parser/player.rb', line 13

def ==(other)
  steam_id == other.steam_id
end