Class: TF2Class
- Inherits:
-
Object
- Object
- TF2Class
- Includes:
- GameClass
- Defined in:
- lib/steam/community/tf2/tf2_class.rb
Overview
Represents the stats for a Team Fortress 2 class for a specific user
Direct Known Subclasses
Instance Attribute Summary collapse
-
#max_buildings_destroyed ⇒ Fixnum
readonly
Returns the maximum number of buildings the player has destroyed in a single life with this class.
-
#max_captures ⇒ Fixnum
readonly
Returns the maximum number of points captured by the player in a single life with this class.
-
#max_damage ⇒ Fixnum
readonly
Returns the maximum damage dealt by the player in a single life with this class.
-
#max_defenses ⇒ Fixnum
readonly
Returns the maximum number of defenses by the player in a single life with this class.
-
#max_dominations ⇒ Fixnum
readonly
Returns the maximum number of dominations by the player in a single life with this class.
-
#max_kill_assists ⇒ Fixnum
readonly
Returns the maximum number of times the the player assisted a teammate with killing an enemy in a single life with this class.
-
#max_kills ⇒ Fixnum
readonly
Returns the maximum number of enemies killed by the player in a single life with this class.
-
#max_revenges ⇒ Fixnum
readonly
Returns the maximum number of revenges by the player in a single life with this class.
-
#max_score ⇒ Fixnum
readonly
Returns the maximum number score achieved by the player in a single life with this class.
-
#max_time_alive ⇒ Fixnum
readonly
Returns the maximum lifetime by the player in a single life with this class.
Attributes included from GameClass
Instance Method Summary collapse
-
#initialize(class_data) ⇒ TF2Class
constructor
Creates a new TF2 class instance based on the assigned XML data.
Constructor Details
#initialize(class_data) ⇒ TF2Class
Creates a new TF2 class instance based on the assigned XML data
77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/steam/community/tf2/tf2_class.rb', line 77 def initialize(class_data) @name = class_data['className'] @max_buildings_destroyed = class_data['ibuildingsdestroyed'].to_i @max_captures = class_data['ipointcaptures'].to_i @max_damage = class_data['idamagedealt'].to_i @max_defenses = class_data['ipointdefenses'].to_i @max_dominations = class_data['idominations'].to_i @max_kill_assists = class_data['ikillassists'].to_i @max_kills = class_data['inumberofkills'].to_i @max_revenges = class_data['irevenge'].to_i @max_score = class_data['ipointsscored'].to_i @max_time_alive = class_data['iplaytime'].to_i @play_time = class_data['playtimeSeconds'].to_i end |
Instance Attribute Details
#max_buildings_destroyed ⇒ Fixnum (readonly)
Returns the maximum number of buildings the player has destroyed in a single life with this class
19 20 21 |
# File 'lib/steam/community/tf2/tf2_class.rb', line 19 def max_buildings_destroyed @max_buildings_destroyed end |
#max_captures ⇒ Fixnum (readonly)
Returns the maximum number of points captured by the player in a single life with this class
25 26 27 |
# File 'lib/steam/community/tf2/tf2_class.rb', line 25 def max_captures @max_captures end |
#max_damage ⇒ Fixnum (readonly)
Returns the maximum damage dealt by the player in a single life with this class
31 32 33 |
# File 'lib/steam/community/tf2/tf2_class.rb', line 31 def max_damage @max_damage end |
#max_defenses ⇒ Fixnum (readonly)
Returns the maximum number of defenses by the player in a single life with this class
37 38 39 |
# File 'lib/steam/community/tf2/tf2_class.rb', line 37 def max_defenses @max_defenses end |
#max_dominations ⇒ Fixnum (readonly)
Returns the maximum number of dominations by the player in a single life with this class
43 44 45 |
# File 'lib/steam/community/tf2/tf2_class.rb', line 43 def max_dominations @max_dominations end |
#max_kill_assists ⇒ Fixnum (readonly)
Returns the maximum number of times the the player assisted a teammate with killing an enemy in a single life with this class
49 50 51 |
# File 'lib/steam/community/tf2/tf2_class.rb', line 49 def max_kill_assists @max_kill_assists end |
#max_kills ⇒ Fixnum (readonly)
Returns the maximum number of enemies killed by the player in a single life with this class
55 56 57 |
# File 'lib/steam/community/tf2/tf2_class.rb', line 55 def max_kills @max_kills end |
#max_revenges ⇒ Fixnum (readonly)
Returns the maximum number of revenges by the player in a single life with this class
61 62 63 |
# File 'lib/steam/community/tf2/tf2_class.rb', line 61 def max_revenges @max_revenges end |
#max_score ⇒ Fixnum (readonly)
Returns the maximum number score achieved by the player in a single life with this class
67 68 69 |
# File 'lib/steam/community/tf2/tf2_class.rb', line 67 def max_score @max_score end |
#max_time_alive ⇒ Fixnum (readonly)
Returns the maximum lifetime by the player in a single life with this class
72 73 74 |
# File 'lib/steam/community/tf2/tf2_class.rb', line 72 def max_time_alive @max_time_alive end |