Class: TF2Sniper
- Defined in:
- lib/steam/community/tf2/tf2_sniper.rb
Overview
Represents the stats for the Team Fortress 2 Sniper class for a specific user
Instance Attribute Summary collapse
-
#max_headshots ⇒ Fixnum
readonly
Returns the maximum number enemies killed with a headshot by the player in a single life as a Sniper.
Attributes inherited from TF2Class
#max_buildings_destroyed, #max_captures, #max_damage, #max_defenses, #max_dominations, #max_kill_assists, #max_kills, #max_revenges, #max_score, #max_time_alive
Attributes included from GameClass
Instance Method Summary collapse
-
#initialize(class_data) ⇒ TF2Sniper
constructor
Creates a new instance of the Sniper class based on the given XML data.
Constructor Details
#initialize(class_data) ⇒ TF2Sniper
Creates a new instance of the Sniper class based on the given XML data
22 23 24 25 26 |
# File 'lib/steam/community/tf2/tf2_sniper.rb', line 22 def initialize(class_data) super class_data @max_headshots = class_data['iheadshots'].to_i end |
Instance Attribute Details
#max_headshots ⇒ Fixnum (readonly)
Returns the maximum number enemies killed with a headshot by the player in a single life as a Sniper
17 18 19 |
# File 'lib/steam/community/tf2/tf2_sniper.rb', line 17 def max_headshots @max_headshots end |