Class: TF2Medic

Inherits:
TF2Class show all
Defined in:
lib/steam/community/tf2/tf2_medic.rb

Overview

Represents the stats for the Team Fortress 2 Medic class for a specific user

Author:

  • Sebastian Staudt

Instance Attribute Summary collapse

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

#name, #play_time

Instance Method Summary collapse

Constructor Details

#initialize(class_data) ⇒ TF2Medic

Creates a new instance of the Medic class based on the given XML data

Parameters:

  • class_data (Hash<String, Object>)

    The XML data for this Medic



28
29
30
31
32
33
# File 'lib/steam/community/tf2/tf2_medic.rb', line 28

def initialize(class_data)
  super class_data

  @max_health_healed = class_data['ihealthpointshealed'].to_i
  @max_ubercharges   = class_data['inuminvulnerable'].to_i
end

Instance Attribute Details

#max_health_healedFixnum (readonly)

Returns the maximum health healed for teammates by the player in a single life as a Medic

Returns:

  • (Fixnum)

    Maximum health healed



17
18
19
# File 'lib/steam/community/tf2/tf2_medic.rb', line 17

def max_health_healed
  @max_health_healed
end

#max_uberchargesFixnum (readonly)

Returns the maximum number of ÜberCharges provided by the player in a single life as a Medic

Returns:

  • (Fixnum)

    Maximum number of ÜberCharges



23
24
25
# File 'lib/steam/community/tf2/tf2_medic.rb', line 23

def max_ubercharges
  @max_ubercharges
end